fix: make sure the app is fully ready before trying to redirect to the login page
This commit is contained in:
parent
68a76faacc
commit
55826bb8c9
3 changed files with 14 additions and 8 deletions
|
|
@ -575,11 +575,7 @@ const router = createRouter({
|
|||
],
|
||||
})
|
||||
|
||||
router.beforeEach((to) => {
|
||||
return checkAuth(to)
|
||||
})
|
||||
|
||||
function checkAuth(route: RouteLocation) {
|
||||
export function checkAuth(route: RouteLocation) {
|
||||
const authUser = store.getters['auth/authUser']
|
||||
const authLinkShare = store.getters['auth/authLinkShare']
|
||||
|
||||
|
|
|
|||
Reference in a new issue