From f131dc4ec00e9b580b0db143cd651ba771ee240b Mon Sep 17 00:00:00 2001 From: nsalyzyn Date: Sat, 20 Dec 2025 14:47:24 -0700 Subject: [PATCH] Saving a bit on resources in the chat callback --- module/applications/ui/chatLog.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index a9313110..8bec640b 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -55,10 +55,10 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo ]; } - addChatListeners = async (app, html, _) => { + addChatListeners = async (app, html, data) => { // Despite documentation, the third parameter may be empty as per // https://github.com/foundryvtt/foundryvtt/issues/11984 - const message = app.toObject(false); + const message = data?.message ?? app.toObject(false); html.querySelectorAll('.simple-roll-button').forEach(element => element.addEventListener('click', event => this.onRollSimple(event, message)) );