From 449c3e242860ba572eaa606d535d0b349337d6b5 Mon Sep 17 00:00:00 2001 From: lilia Date: Wed, 5 Apr 2017 11:42:30 -0700 Subject: [PATCH] Don't auto-open devtools in prod --- main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index ecdc05fdb21c..0f8ba869ae01 100644 --- a/main.js +++ b/main.js @@ -68,8 +68,10 @@ function createWindow () { } })) - // Open the DevTools. - mainWindow.webContents.openDevTools() + if (NODE_ENV === 'development') { + // Open the DevTools. + mainWindow.webContents.openDevTools() + } // Emitted when the window is closed. mainWindow.on('closed', function () {