diff --git a/src/ui/debugWindow.ts b/src/ui/debugWindow.ts index c5b7792..65703c1 100644 --- a/src/ui/debugWindow.ts +++ b/src/ui/debugWindow.ts @@ -14,8 +14,13 @@ class DebugWindow constructor(private entityId: number) { - this._window = ui.getWindow(DebugWindow.identifier) - ?? this.createWindow(); + this._window = ui.getWindow(DebugWindow.identifier); + if (this._window) + { + this._window.close(); + } + + this._window = this.createWindow(); }