From 2761ebbd924785775441f2408fb8d1fe42b361e2 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Mon, 8 May 2017 05:22:38 -0400 Subject: [PATCH] Attach did-finish-load event to win.webContents instead of win --- app/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index 71fe2840a..cac430513 100644 --- a/app/main.js +++ b/app/main.js @@ -114,11 +114,12 @@ function getPidsForProcessName(name) { function createWindow () { win = new BrowserWindow({backgroundColor: '#155B4A', minWidth: 800, minHeight: 600 }) //$color-primary + win.maximize() // win.webContents.openDevTools(); win.loadURL(`file://${__dirname}/dist/index.html`) if (openUri) { // We stored and received a URI that an external app requested before we had a window object - win.on('did-finish-load', () => { + win.webContents.on('did-finish-load', () => { win.webContents.send('open-uri-requested', openUri); }); }