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)