chore: expose only required methods

This commit is contained in:
userquin 2023-02-11 12:42:01 +01:00
parent 5acd2224df
commit f3a8778ede

View file

@ -43,7 +43,8 @@ export default defineNuxtPlugin((nuxtApp) => {
if (scrollPosition)
window.scrollTo(0, scrollPosition)
// required for custom routes: first call will reject
// required for custom routes: first call will be rejected
// we need to enable scroll tracking again, it is disabled
if (!track.value) {
nextTick().then(() => {
track.value = true
@ -82,12 +83,11 @@ export default defineNuxtPlugin((nuxtApp) => {
return {
provide: {
trackScroll: reactive({
trackScroll: {
forceScrollToTop,
restoreScroll,
registerCustomRoute,
restoreCustomPageScroll,
}),
},
},
}
})