From 2ade4aed28db8c936a51f20a4cf9437f536f1815 Mon Sep 17 00:00:00 2001 From: Kevin Cui Date: Fri, 25 Oct 2024 19:49:21 +0800 Subject: [PATCH] fix(app): throw error popup when close window (#1144) --- apps/main/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/main/src/index.ts b/apps/main/src/index.ts index bb95d139b..836a807f3 100644 --- a/apps/main/src/index.ts +++ b/apps/main/src/index.ts @@ -123,7 +123,7 @@ function bootstrap() { app.on("before-quit", () => { // store window pos when before app quit const window = getMainWindow() - if (!window) return + if (!window || window.isDestroyed()) return const bounds = window.getBounds() store.set(windowStateStoreKey, {