chore(core): 使用path模块替代手动字符串拼接构造路径

This commit is contained in:
王立帮
2025-05-05 22:22:09 +08:00
parent aff8b8f21f
commit ef36a3fa55
3 changed files with 4 additions and 2 deletions

View File

@@ -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);
}
}