diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/index.js | 18 |
1 files changed, 10 insertions, 8 deletions
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) { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | // Force single window | 31 | // Force single window |
32 | const isSecondInstance = app.makeSingleInstance(() => { | 32 | if (process.platform !== 'darwin') { |
33 | if (mainWindow) { | 33 | const isSecondInstance = app.makeSingleInstance(() => { |
34 | if (mainWindow.isMinimized()) mainWindow.restore(); | 34 | if (mainWindow) { |
35 | mainWindow.focus(); | 35 | if (mainWindow.isMinimized()) mainWindow.restore(); |
36 | } | 36 | mainWindow.focus(); |
37 | }); | 37 | } |
38 | }); | ||
38 | 39 | ||
39 | if (isSecondInstance) { | 40 | if (isSecondInstance) { |
40 | app.quit(); | 41 | app.quit(); |
42 | } | ||
41 | } | 43 | } |
42 | 44 | ||
43 | // Initialize Settings | 45 | // Initialize Settings |