Browse Source

refactor: use app.whenReady(), not of .once(ready) (#366)

Similar to c83f836faf in electron/electron
main
Charles Kerr 6 years ago
committed by GitHub
parent
commit
bfe7da1a9b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      main.js

2
main.js

@ -22,7 +22,7 @@ function createWindow () {
// This method will be called when Electron has finished // This method will be called when Electron has finished
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs. // Some APIs can only be used after this event occurs.
app.on('ready', createWindow)
app.whenReady().then(createWindow)
// Quit when all windows are closed. // Quit when all windows are closed.
app.on('window-all-closed', function () { app.on('window-all-closed', function () {

Loading…
Cancel
Save