Skip to content

Commit

Permalink
prevent render of hud is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
reonZ committed Aug 29, 2024
1 parent 9af7d57 commit 2bc5680
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/hud/base/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ abstract class PF2eHudBase<
this._onEnable?.(enabled);
}, 1);

async render(options?: boolean | Partial<TRenderOptions>, _options?: Partial<TRenderOptions>) {
if (!this.enabled) return this;
return super.render(options, _options);
}

async close(options: ApplicationClosingOptions = {}): Promise<this> {
options.animate = false;
return super.close(options);
Expand Down

0 comments on commit 2bc5680

Please sign in to comment.