From 5ad9f6c671b75b52f80ea3afd1cc2e4e094e0aa5 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Tue, 28 Nov 2017 19:51:29 +0000 Subject: [PATCH] fix error when opening a new instance when one already exists Fixes "Cannot find module '../dialog'" by returning after checking if an instance already exists instead of allowing the code to continue and try to make new instance. --- electron/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electron/main.js b/electron/main.js index 7068f912ed..75a9864bbc 100644 --- a/electron/main.js +++ b/electron/main.js @@ -41,8 +41,10 @@ let shouldQuitBecauseAppIsAnotherInstance = app.makeSingleInstance(() => { mainWin.focus(); } }); + if (shouldQuitBecauseAppIsAnotherInstance) { quitApp(); + return; } // APP EVENT LISTENERS