Skip to content

Commit e035f48

Browse files
author
Willy Weise
committed
app.quit will now be called when all windows are closed instead by closing only the main window. On macOS the app is not supposed to quit
1 parent df82325 commit e035f48

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

electron-webpack-vuejs/src/main/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ app.on('ready', () => {
1717
slashes: true
1818
}))
1919
}
20-
window.on('closed', function(){
21-
window = null
22-
app.quit()
20+
window.on("closed", () => {
21+
window = null;
2322
})
23+
})
24+
25+
app.on("window-all-closed", () => {
26+
if (process.platform !== "darwin") {
27+
app.quit();
28+
}
2429
})

0 commit comments

Comments
 (0)