From ebd1dc79618e9c5bb9124a7dc1595f3386a04559 Mon Sep 17 00:00:00 2001 From: Bas Date: Sat, 5 Dec 2020 23:46:35 +0100 Subject: [PATCH] Fix debug window not refreshing when selecting new vehicle. --- src/ui/debugWindow.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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(); }