Ver Fonte

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

Similar to c83f836faf1888ab3eb443bf719c054bcc7e4e1b in electron/electron
Charles Kerr há 5 anos atrás
pai
commit
bfe7da1a9b
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      main.js

+ 1 - 1
main.js

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