diff --git a/src/main/index.ts b/src/main/index.ts index 3e3d7eb..0a3673c 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -79,11 +79,13 @@ app.whenReady().then(async () => { app.on('activate', function () { // On macOS it's common to re-create a window in the app when the // dock icon is clicked and there are no other windows open. - if (BrowserWindow.getAllWindows().length === 0) { + if (!mainWindow) { if (destroyTimer) { clearTimeout(destroyTimer) } createWindow(true) + } else { + showMainWindow() } }) })