Преглед изворни кода

fix: 登录后getTopMenu()可能返回undefined导致跳转crash

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
skyline пре 2 недеља
родитељ
комит
e9729dfe96
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      haha-admin-web/src/views/login/index.vue

+ 1 - 1
haha-admin-web/src/views/login/index.vue

@@ -64,7 +64,7 @@ const onLogin = async (formEl: FormInstance | undefined) => {
             return initRouter().then(() => {
               disabled.value = true;
               router
-                .push(getTopMenu(true).path)
+                .push(getTopMenu(true)?.path || "/")
                 .then(() => {
                   message("登录成功", { type: "success" });
                 })