From af1b5f1d33873830a9460a000a3fb2ad7abc32c8 Mon Sep 17 00:00:00 2001 From: Azir-11 <2075125282@qq.com> Date: Fri, 13 Mar 2026 15:52:56 +0800 Subject: [PATCH] fix(projects): fix wrong new tab opening for external link navigation. --- src/router/guard/route.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/router/guard/route.ts b/src/router/guard/route.ts index 61626be4..aa8d65a2 100644 --- a/src/router/guard/route.ts +++ b/src/router/guard/route.ts @@ -38,8 +38,7 @@ export function createRouteGuard(router: Router) { // if the route does not need login, then it is allowed to access directly if (!needLogin) { - handleRouteSwitch(to, from); - return; + return handleRouteSwitch(to, from); } // the route need login but the user is not logged in, then switch to the login page @@ -53,7 +52,7 @@ export function createRouteGuard(router: Router) { } // switch route normally - handleRouteSwitch(to, from); + return handleRouteSwitch(to, from); }); }