From 3728ae57b49c6d780b0fbcb69bd89ee931a7623f Mon Sep 17 00:00:00 2001 From: CharleeWa <18888351756@163.com> Date: Mon, 13 Jan 2025 10:07:56 +0800 Subject: [PATCH] refactor: Remove next parameter from router guards --- src/router/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 0aaba34..9646cc2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -22,7 +22,7 @@ const router = createRouter({ if (import.meta.hot) handleHotUpdate(router) -router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => { +router.beforeEach(async (to: EnhancedRouteLocation) => { NProgress.start() const routeCacheStore = useRouteCacheStore() @@ -36,8 +36,6 @@ router.beforeEach(async (to: EnhancedRouteLocation, _from, next) => { if (isLogin() && !userStore.userInfo?.uid) await userStore.info() - - next() }) router.afterEach(() => {