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

This commit is contained in:
WBHarry 2026-01-22 16:52:22 +01:00 committed by GitHub
parent 38fb00bd10
commit 1f7d4d6f1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;