XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

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
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +6 -3
Modified static/webui/script.js +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