From a5ef299f4ebd5f12c395c70727454f087d1f594a Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Mon, 21 May 2018 00:50:05 +0200 Subject: [PATCH] Simplify loading according to new electron api --- src/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/index.js b/src/index.js index 6383322b..03faa43d 100644 --- a/src/index.js +++ b/src/index.js @@ -22,11 +22,7 @@ function createWindow() { mainWindow = new BrowserWindow({ darkTheme: true, }); - mainWindow.loadURL(url.format({ - pathname: path.join(__dirname, 'index.html'), - protocol: 'file:', - slashes: true, - })); + mainWindow.loadFile('index.html'); mainWindow.on('closed', () => { // Dereference the window object, usually you would store windows