Skip to content

Commit

Permalink
fix: fixes #98
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Porter committed Jan 10, 2018
1 parent 5fcfca0 commit 136344b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as path from 'path';
let win, serve;
const args = process.argv.slice(1);
serve = args.some(val => val === '--serve');
import * as url from 'url';

if (serve) {
require('electron-reload')(__dirname, {
Expand All @@ -24,7 +25,11 @@ function createWindow() {
});

// and load the index.html of the app.
win.loadURL('file://' + __dirname + '/index.html');
win.loadURL(url.format({
protocol: 'file:',
pathname: path.join(__dirname, '/index.html'),
slashes: true
}));

// Open the DevTools.
if (serve) {
Expand Down

0 comments on commit 136344b

Please sign in to comment.