Skip to content

Commit 3c4e1bf

Browse files
committed
1 parent 15bc93c commit 3c4e1bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as path from 'path';
44
let win, serve;
55
const args = process.argv.slice(1);
66
serve = args.some(val => val === '--serve');
7+
import * as url from 'url';
78

89
if (serve) {
910
require('electron-reload')(__dirname, {
@@ -24,7 +25,11 @@ function createWindow() {
2425
});
2526

2627
// and load the index.html of the app.
27-
win.loadURL('file://' + __dirname + '/index.html');
28+
win.loadURL(url.format({
29+
protocol: 'file:',
30+
pathname: path.join(__dirname, '/index.html'),
31+
slashes: true
32+
}));
2833

2934
// Open the DevTools.
3035
if (serve) {

0 commit comments

Comments
 (0)