Skip to content

Commit af1b5f1

Browse files
Azir-11honghuangdc
authored andcommitted
fix(projects): fix wrong new tab opening for external link navigation.
1 parent 75ccd00 commit af1b5f1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/router/guard/route.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export function createRouteGuard(router: Router) {
3838

3939
// if the route does not need login, then it is allowed to access directly
4040
if (!needLogin) {
41-
handleRouteSwitch(to, from);
42-
return;
41+
return handleRouteSwitch(to, from);
4342
}
4443

4544
// 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) {
5352
}
5453

5554
// switch route normally
56-
handleRouteSwitch(to, from);
55+
return handleRouteSwitch(to, from);
5756
});
5857
}
5958

0 commit comments

Comments
 (0)