Just using the app directly in the daggerheart.mjs hook for chatHTML

This commit is contained in:
nsalyzyn 2025-12-20 14:41:45 -07:00
parent ffc82daeea
commit bb5e58d3e7

View file

@ -197,8 +197,7 @@ Hooks.on('renderChatMessageHTML', (app, element, _) => {
enricherRenderSetup(element); enricherRenderSetup(element);
// 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 cssClass = app.flags?.daggerheart?.cssClass;
const cssClass = message.flags?.daggerheart?.cssClass;
if (cssClass) cssClass.split(' ').forEach(cls => element.classList.add(cls)); if (cssClass) cssClass.split(' ').forEach(cls => element.classList.add(cls));
}); });