mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 12:41:07 +01:00
Checking for empty data in renderChatMessageHTML calls
This commit is contained in:
parent
474cf28a53
commit
0bd49604f8
2 changed files with 5 additions and 3 deletions
|
|
@ -195,6 +195,7 @@ Hooks.once('dicesoniceready', () => {});
|
|||
|
||||
Hooks.on('renderChatMessageHTML', (_, element, message) => {
|
||||
enricherRenderSetup(element);
|
||||
if (!message) return;
|
||||
const cssClass = message.message.flags?.daggerheart?.cssClass;
|
||||
if (cssClass) cssClass.split(' ').forEach(cls => element.classList.add(cls));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue