Skip to content

Commit e8eacb0

Browse files
committed
feat: 未登录情况下防止进入路由死循环
1 parent e9dd55f commit e8eacb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/src/permission.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ router.beforeEach(async (to, from) => {
9090
if(!routerStore.asyncRouterFlag){
9191
await setupRouter(userStore)
9292
}
93-
return { name: userStore.userInfo.authority.defaultRouter }
93+
if(userStore.userInfo.authority.defaultRouter){
94+
return { name: userStore.userInfo.authority.defaultRouter }
95+
}
9496
}
9597
return true
9698
}

0 commit comments

Comments
 (0)