Skip to content

Commit 3728ae5

Browse files
committed
refactor: Remove next parameter from router guards
1 parent e575881 commit 3728ae5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/router/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const router = createRouter({
2222
if (import.meta.hot)
2323
handleHotUpdate(router)
2424

25-
router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => {
25+
router.beforeEach(async (to: EnhancedRouteLocation) => {
2626
NProgress.start()
2727

2828
const routeCacheStore = useRouteCacheStore()
@@ -36,8 +36,6 @@ router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => {
3636

3737
if (isLogin() && !userStore.userInfo?.uid)
3838
await userStore.info()
39-
40-
next()
4139
})
4240

4341
router.afterEach(() => {

0 commit comments

Comments
 (0)