Skip to content

Commit

Permalink
Fix loading of index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Aug 15, 2017
1 parent c2d6bc2 commit 8fccd53
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const electron = require('electron'); // eslint-disable-line
const isDev = require('electron-is-dev');
const path = require('path');
const url = require('url');

const menu = require('./menu');

Expand All @@ -18,7 +20,11 @@ function createWindow() {
mainWindow = new BrowserWindow({
darkTheme: true,
});
mainWindow.loadURL(`file://${__dirname}/index.html`);
mainWindow.loadURL(url.format({
pathname: path.join(__dirname, 'index.html'),
protocol: 'file:',
slashes: true,
}));

mainWindow.on('closed', () => {
// Dereference the window object, usually you would store windows
Expand Down

0 comments on commit 8fccd53

Please sign in to comment.