From f31125eccc332176f1542060540a80260dbf81e6 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 16 May 2017 08:54:48 -0700 Subject: [PATCH] process.env.NODE_ENV -> environment FREEBIE --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 49dd19c72..33da3c62f 100644 --- a/main.js +++ b/main.js @@ -140,7 +140,7 @@ function createWindow () { }) } - if (process.env.NODE_ENV === 'test') { + if (environment === 'test') { mainWindow.loadURL(prepareURL([__dirname, 'test', 'index.html'])); } else { mainWindow.loadURL(prepareURL([__dirname, 'background.html'])); @@ -165,7 +165,7 @@ function createWindow () { // Emitted when the window is about to be closed. mainWindow.on('close', function (e) { - if (process.platform === 'darwin' && !shouldQuit && process.env.NODE_ENV !== 'test') { + if (process.platform === 'darwin' && !shouldQuit && environment !== 'test') { e.preventDefault(); mainWindow.hide(); } @@ -216,7 +216,7 @@ app.on('before-quit', function() { app.on('window-all-closed', function () { // On OS X it is common for applications and their menu bar // to stay active until the user quits explicitly with Cmd + Q - if (process.platform !== 'darwin' || process.env.NODE_ENV === 'test') { + if (process.platform !== 'darwin' || environment === 'test') { app.quit() } })