Forráskód Böngészése

Simplify if statements (#268)

Richie Bendall 6 éve
szülő
commit
dbc225ca76
1 módosított fájl, 2 hozzáadás és 6 törlés
  1. 2 6
      main.js

+ 2 - 6
main.js

@@ -39,17 +39,13 @@ app.on('ready', createWindow)
 app.on('window-all-closed', function () {
   // 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()
-  }
+  if (process.platform !== 'darwin') app.quit()
 })
 
 app.on('activate', function () {
   // On macOS it's common to re-create a window in the app when the
   // dock icon is clicked and there are no other windows open.
-  if (mainWindow === null) {
-    createWindow()
-  }
+  if (mainWindow === null) createWindow()
 })
 
 // In this file you can include the rest of your app's specific main process