From 31544a386a41ea4ca8f62a6fa0ae3766f1c92f12 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 25 Apr 2022 13:10:43 -0400 Subject: [PATCH] cleanup WindowManager Signed-off-by: Sebastian Malton --- src/main/window-manager.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/window-manager.ts b/src/main/window-manager.ts index 4097bf1ab7..3b60b2e5a1 100644 --- a/src/main/window-manager.ts +++ b/src/main/window-manager.ts @@ -41,12 +41,10 @@ export class WindowManager extends Singleton { private async initMainWindow(showSplash: boolean): Promise { // Manage main window size and position with state persistence - if (!this.windowState) { - this.windowState = windowStateKeeper({ - defaultHeight: 900, - defaultWidth: 1440, - }); - } + this.windowState ??= windowStateKeeper({ + defaultHeight: 900, + defaultWidth: 1440, + }); if (!this.mainWindow) { // show icon in dock (mac-os only)