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)) );