浏览代码

Simplify if statements (#268)

Richie Bendall 6 年之前
父节点
当前提交
dbc225ca76
共有 1 个文件被更改,包括 2 次插入6 次删除
  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