From b189b31347c8e8359373cd7aba619e9f0168ca98 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Wed, 10 May 2017 04:30:26 -0400 Subject: [PATCH] Fix handling for URIs requested before window is open on Windows --- app/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index e2035bcc2..4fcf6572e 100644 --- a/app/main.js +++ b/app/main.js @@ -327,5 +327,9 @@ if (process.platform == 'darwin') { }); } else if (process.argv.length >= 3) { // No open-url event on Win, but we can still handle URIs provided at launch time - win.webContents.send('open-uri-requested', process.argv[2]); + if (!win) { + openUri = process.argv[2]; + } else { + win.webContents.send('open-uri-requested', process.argv[2]); + } }