refactor: Remove next parameter from router guards

This commit is contained in:
CharleeWa 2025-01-13 10:07:56 +08:00
parent e575881c28
commit 3728ae57b4
1 changed files with 1 additions and 3 deletions

View File

@ -22,7 +22,7 @@ const router = createRouter({
if (import.meta.hot) if (import.meta.hot)
handleHotUpdate(router) handleHotUpdate(router)
router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => { router.beforeEach(async (to: EnhancedRouteLocation) => {
NProgress.start() NProgress.start()
const routeCacheStore = useRouteCacheStore() const routeCacheStore = useRouteCacheStore()
@ -36,8 +36,6 @@ router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => {
if (isLogin() && !userStore.userInfo?.uid) if (isLogin() && !userStore.userInfo?.uid)
await userStore.info() await userStore.info()
next()
}) })
router.afterEach(() => { router.afterEach(() => {