docs: fix explanation of darwin auto-quit prevention (#24003)

This commit is contained in:
Benjamin Sova 2020-06-10 20:08:27 -06:00 committed by GitHub
parent ce042184de
commit a33c10c3ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,10 +141,10 @@ function createWindow () {
// Some APIs can only be used after this event occurs.
app.whenReady().then(createWindow)
// Quit when all windows are closed.
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', () => {
// On macOS it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== 'darwin') {
app.quit()
}