返回提交历史
Modified
static/webui/script.js
+6
-3
XFEstudio/XFESpaceNinjaServer
fix(webui): handle updateTitle being called before a route is active (#4275)
Can happen via setActiveLanguage Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4275 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
e8424823
代码差异
1 个文件
+6
-3
@@ -396,9 +396,12 @@ function changeAccountEmail() {
396
396
}
397
397
398
398
function updateTitle() {
399
const tag = single.getCurrentRoute().elm.getAttribute("data-title-tag");
400
if (tag) {
401
document.querySelector("title").textContent = loc(tag) + " | OpenWF WebUI";
399
const route = single.getCurrentRoute();
400
if (route) {
401
const tag = route.elm.getAttribute("data-title-tag");
402
if (tag) {
403
document.querySelector("title").textContent = loc(tag) + " | OpenWF WebUI";
404
}
402
405
}
403
406
}
404
407