From 24a052858bc9aaab738bdca91e06a2ce1d6109e8 Mon Sep 17 00:00:00 2001 From: Idle <651462+reonZ@users.noreply.github.com> Date: Wed, 4 Dec 2024 02:37:23 +0100 Subject: [PATCH] make sure the ChatLog is rendered --- src/hud/base/directory.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hud/base/directory.ts b/src/hud/base/directory.ts index 105e2b8..9ea3796 100644 --- a/src/hud/base/directory.ts +++ b/src/hud/base/directory.ts @@ -18,7 +18,15 @@ abstract class PF2eHudDirectory< _onEnable(enabled = this.enabled) { if (enabled && !this.rendered) { - runWhenReady(() => this.render(true)); + runWhenReady(() => { + if (ui.chat.rendered) { + this.render(true); + } else { + Hooks.once("renderChatLog", () => { + this.render(true); + }); + } + }); } else if (!enabled && this.rendered) { this.close(); }