From 5f263002f0294fe8f3f009bab40575625803b4f3 Mon Sep 17 00:00:00 2001 From: David Kaya Date: Thu, 16 Apr 2026 14:43:41 +0200 Subject: [PATCH] fix: pass mainWindow argument to showAndFocusWindow in second-instance handler The showAndFocusWindow function signature was updated to require a mainWindow parameter, but the call site in the second-instance handler was not updated, causing a TypeScript compilation error that broke CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/main/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index 5306485..3dcef62 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -116,7 +116,9 @@ async function bootstrap(): Promise { } app.on('second-instance', () => { - showAndFocusWindow(); + if (mainWindow && !mainWindow.isDestroyed()) { + showAndFocusWindow(mainWindow); + } }); app.whenReady().then(bootstrap);