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
|
to.hash = from.hash
|
||||||
}
|
}
|
||||||
|
|
||||||
if (to.hash.startsWith(LINK_SHARE_HASH_PREFIX)) {
|
if (to.hash.startsWith(linkShareHashPrefix) && getToken() === null) {
|
||||||
const currentAuthToken = getToken()
|
|
||||||
if (currentAuthToken === null) {
|
|
||||||
saveLastVisited(to.name as string, to.params, to.query)
|
saveLastVisited(to.name as string, to.params, to.query)
|
||||||
return {
|
return {
|
||||||
name: 'link-share.auth',
|
name: 'link-share.auth',
|
||||||
@ -501,7 +499,6 @@ router.beforeEach(async (to, from) => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const newRoute = await getAuthForRoute(to)
|
const newRoute = await getAuthForRoute(to)
|
||||||
if(newRoute) {
|
if(newRoute) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user