chore: refactor some names
This commit is contained in:
parent
bb119d0f8d
commit
9bc00be29a
1 changed files with 5 additions and 5 deletions
|
|
@ -18,10 +18,10 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||||
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
|
window.scrollTo({ top: 0, left: 0, behavior: 'smooth' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const restoreScrollCallback = (ignoreHook: boolean) => {
|
const restoreScrollCallback = (ignoreCustomRoutes: boolean) => {
|
||||||
const path = route.fullPath
|
const path = route.fullPath
|
||||||
return nextTick().then(() => {
|
return nextTick().then(() => {
|
||||||
if (route.meta && route.meta?.noScrollTrack) {
|
if (route.meta?.noScrollTrack) {
|
||||||
forceScroll()
|
forceScroll()
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
|
|
@ -34,9 +34,9 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!route.meta || !route.meta?.noScrollTrack) {
|
if (!route.meta || !route.meta?.noScrollTrack) {
|
||||||
const hook = ignoreHook ? undefined : customRoutes.has(route.fullPath)
|
const r = ignoreCustomRoutes ? undefined : customRoutes.has(route.fullPath)
|
||||||
if (hook) {
|
if (r) {
|
||||||
reject(new Error('hook detected'))
|
reject(new Error('custom routed detected'))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue