Skip to content

Commit

Permalink
make sure the ChatLog is rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
reonZ committed Dec 4, 2024
1 parent 5e98885 commit 24a0528
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/hud/base/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 24a0528

Please sign in to comment.