chore: reduce nesting
This commit is contained in:
parent
7c964c29d4
commit
06a1ff6f4b
@ -490,9 +490,7 @@ router.beforeEach(async (to, from) => {
|
||||
to.hash = from.hash
|
||||
}
|
||||
|
||||
if (to.hash.startsWith(LINK_SHARE_HASH_PREFIX)) {
|
||||
const currentAuthToken = getToken()
|
||||
if (currentAuthToken === null) {
|
||||
if (to.hash.startsWith(linkShareHashPrefix) && getToken() === null) {
|
||||
saveLastVisited(to.name as string, to.params, to.query)
|
||||
return {
|
||||
name: 'link-share.auth',
|
||||
@ -501,7 +499,6 @@ router.beforeEach(async (to, from) => {
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const newRoute = await getAuthForRoute(to)
|
||||
if(newRoute) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user