forked from Mirrors/elk
chore: simplify logic
This commit is contained in:
parent
9bc00be29a
commit
1241921435
1 changed files with 8 additions and 13 deletions
|
@ -33,7 +33,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||
return
|
||||
}
|
||||
|
||||
if (!route.meta || !route.meta?.noScrollTrack) {
|
||||
const r = ignoreCustomRoutes ? undefined : customRoutes.has(route.fullPath)
|
||||
if (r) {
|
||||
reject(new Error('custom routed detected'))
|
||||
|
@ -43,10 +42,6 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|||
const scrollPosition = storage.value[route.fullPath]
|
||||
if (scrollPosition)
|
||||
window.scrollTo(0, scrollPosition)
|
||||
}
|
||||
else {
|
||||
forceScroll()
|
||||
}
|
||||
|
||||
resolve()
|
||||
}, 600)
|
||||
|
|
Loading…
Reference in a new issue