diff options
Diffstat (limited to 'src/router/index.ts')
-rw-r--r-- | src/router/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/router/index.ts b/src/router/index.ts index af8e2c5..568bad8 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -64,8 +64,8 @@ const router = createRouter({ }) router.beforeEach((to, _, next) => { - if (to.meta.isAuth && !localStorage.getItem("authToken")) { - next("/login?redirected=true") + if (to.meta.isAuth && !localStorage.getItem('authToken')) { + next('/login?redirected=true') } else { next() } |