Fixed an error where a player having their token initially selected caused an error in effectsDisplay.mjs

This commit is contained in:
WBHarry 2026-01-21 18:57:56 +01:00
parent 38fb00bd10
commit 8c87ced9e3

View file

@ -76,6 +76,8 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
};
toggleHidden(token, focused) {
if (!this.element) return;
const effects = DhEffectsDisplay.getTokenEffects(focused ? token : null);
this.element.hidden = effects.length === 0;