How to quit Electron app on Mac?

Viewed 9642

Below is stock code from the Electron website (https://electron.atom.io/docs/tutorial/quick-start/):

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') {
    app.quit()
  }
})

On Mac OS 10.12.4, when the above is called, it will not close the app. Only the window. Adding app.quit() above the conditional does close the app. Did they leave something out specific to Mac OS X that prevents the app from closing?

1 Answers
Related