From 53d268c37e9f6c2b6b7a877d8e4a09772a80b669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Stanislav?= Date: Thu, 26 Oct 2017 22:29:52 +0200 Subject: [PATCH] Fix launch protocol on Linux - Closes #909 --- app/src/main.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main.js b/app/src/main.js index 30afc92a2..39bb17f67 100644 --- a/app/src/main.js +++ b/app/src/main.js @@ -70,8 +70,8 @@ function createWindow() { win.on('blur', () => win.webContents.send('blur')); win.on('focus', () => win.webContents.send('focus')); - if (process.platform === 'win32') { - sendUrlToRouter(process.argv.slice(1)); + if (process.platform !== 'darwin') { + sendUrlToRouter(process.argv[1] || ''); } Menu.setApplicationMenu(buildMenu(app, copyright, i18n)); @@ -142,8 +142,8 @@ app.setAsDefaultProtocolClient(protocolName); // Force single instance application const isSecondInstance = app.makeSingleInstance((argv) => { - if (process.platform === 'win32') { - sendUrlToRouter(argv.slice(1)); + if (process.platform !== 'darwin') { + sendUrlToRouter(argv[1] || ''); } if (win) { if (win.isMinimized()) win.restore(); diff --git a/package.json b/package.json index f7219d62d..01e3600bc 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "css-loader": "0.28.7", "cucumber": "2.2.0", "del-cli": "1.1.0", - "electron": "1.7.8", + "electron": "1.8.1", "electron-builder": "19.32.2", "electron-json-storage": "^3.2.0", "enzyme": "2.9.1",