mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Saving a bit on resources in the chat callback
This commit is contained in:
parent
bb5e58d3e7
commit
f131dc4ec0
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
// Despite documentation, the third parameter may be empty as per
|
||||||
// https://github.com/foundryvtt/foundryvtt/issues/11984
|
// 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 =>
|
html.querySelectorAll('.simple-roll-button').forEach(element =>
|
||||||
element.addEventListener('click', event => this.onRollSimple(event, message))
|
element.addEventListener('click', event => this.onRollSimple(event, message))
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue