Skip to content

Commit 5a0ca0d

Browse files
authored
fix: close main window on first quit on all platforms (#661)
* fix: close main window on first quit cleanup
1 parent 1092cbc commit 5a0ca0d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,8 @@ app.on('before-quit', (e) => {
254254
// monitor node's statuses and alert the user when a node is down, and to continuously
255255
// track node usage.
256256
e.preventDefault(); // halts electron's full quitting action
257-
// todo: close windows?
257+
mainWindow?.close(); // close the main window
258258
if (process.platform === 'darwin' && app.dock) {
259-
mainWindow?.close(); // close the main window
260259
app.dock.hide(); // app appears "quitted" in the dock
261260
}
262261
}

0 commit comments

Comments
 (0)