From 2bfe8456d62d1ca828fe10a00c1c436b164cd061 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Tue, 24 Oct 2017 22:30:15 +0200 Subject: Don't apply app.makeSingleInstance on macOS --- src/index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/index.js b/src/index.js index b07666ba2..9ca059f48 100644 --- a/src/index.js +++ b/src/index.js @@ -29,15 +29,17 @@ if (isWindows) { } // Force single window -const isSecondInstance = app.makeSingleInstance(() => { - if (mainWindow) { - if (mainWindow.isMinimized()) mainWindow.restore(); - mainWindow.focus(); - } -}); +if (process.platform !== 'darwin') { + const isSecondInstance = app.makeSingleInstance(() => { + if (mainWindow) { + if (mainWindow.isMinimized()) mainWindow.restore(); + mainWindow.focus(); + } + }); -if (isSecondInstance) { - app.quit(); + if (isSecondInstance) { + app.quit(); + } } // Initialize Settings -- cgit v1.2.3-70-g09d2