diff --git a/src/main/mainWindow.js b/src/main/mainWindow.js index da3a1b55..1f05409f 100644 --- a/src/main/mainWindow.js +++ b/src/main/mainWindow.js @@ -42,6 +42,11 @@ function createMainWindow(config, options) { }); const mainWindow = new BrowserWindow(windowOptions); + + const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`; + mainWindow.loadURL(indexURL); + + // This section should be called after loadURL() #570 if (options.hideOnStartup) { if (windowOptions.maximized) { mainWindow.maximize(); @@ -59,9 +64,6 @@ function createMainWindow(config, options) { webPreferences.nodeIntegration = false; }); - const indexURL = global.isDev ? 'http://localhost:8080/browser/index.html' : `file://${app.getAppPath()}/browser/index.html`; - mainWindow.loadURL(indexURL); - mainWindow.once('ready-to-show', () => { if (process.platform !== 'darwin') { mainWindow.show();