From 8e87dc2d54b0bfbaffc69d6c961ec5356301ec98 Mon Sep 17 00:00:00 2001 From: Misaki Coca <40165523+MisakiCoca@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:56:58 +0800 Subject: [PATCH] Fixed issue #195 Remove the judgment of Darwin when event 'window-all-closed' occurs. This will close the application on macOS when the last window is closed. --- window.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/window.js b/window.js index fe085547..e9d48b2b 100644 --- a/window.js +++ b/window.js @@ -18,12 +18,11 @@ function createWindow () { app.whenReady().then(createWindow); -app.on('window-all-closed', () => { - if (process.platform !== 'darwin') - app.quit(); +app.on('window-all-closed', function() { + app.quit(); }); app.on('activate', () => { if (BrowserWindow.getAllWindows().length === 0) createWindow(); -}); \ No newline at end of file +});