diff --git a/common/modules/mixly-modules/common/app.js b/common/modules/mixly-modules/common/app.js index b4cfd2df..23f306f5 100644 --- a/common/modules/mixly-modules/common/app.js +++ b/common/modules/mixly-modules/common/app.js @@ -661,7 +661,7 @@ class App extends Component { if (goog.isElectron) { Loader.onbeforeunload(); } else { - let href = Env.srcDirPath + '/index.html?' + Url.jsonToUrl({ boardType: BOARD.boardType }); + let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType }); window.location.replace(href); } } diff --git a/common/modules/mixly-modules/deps.json b/common/modules/mixly-modules/deps.json index 32f22a38..9b187ec7 100644 --- a/common/modules/mixly-modules/deps.json +++ b/common/modules/mixly-modules/deps.json @@ -1441,6 +1441,7 @@ { "path": "/electron/loader.js", "require": [ + "path", "Mixly.Url", "Mixly.Config", "Mixly.Env", diff --git a/common/modules/mixly-modules/electron/loader.js b/common/modules/mixly-modules/electron/loader.js index afb1e557..47d07be9 100644 --- a/common/modules/mixly-modules/electron/loader.js +++ b/common/modules/mixly-modules/electron/loader.js @@ -1,5 +1,6 @@ goog.loadJs('electron', () => { +goog.require('path'); goog.require('Mixly.Url'); goog.require('Mixly.Config'); goog.require('Mixly.Env'); @@ -32,7 +33,7 @@ Loader.onbeforeunload = function(reload = false) { window.location.reload(true); } } - let href = Env.srcDirPath + '/index.html?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' }); + let href = path.join(Env.srcDirPath, 'index.html') + '?' + Url.jsonToUrl({ boardType: BOARD.boardType ?? 'None' }); let endPromise = []; const { mainStatusBarTabs } = Mixly; Serial.getCurrentPortsName().map((name) => {