From 1f7d4d6f1e864fe1fd38aa59601a52f0e28c6553 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:52:22 +0100 Subject: [PATCH] Fixed an error where a player having their token initially selected caused an error in effectsDisplay.mjs (#1569) --- module/applications/ui/effectsDisplay.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/applications/ui/effectsDisplay.mjs b/module/applications/ui/effectsDisplay.mjs index 0875e783..8c0c939c 100644 --- a/module/applications/ui/effectsDisplay.mjs +++ b/module/applications/ui/effectsDisplay.mjs @@ -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;