scroll behavior

This commit is contained in:
lesion
2022-05-06 23:01:17 +02:00
parent 13e5427f3c
commit 8981740620

View File

@@ -1,10 +1,6 @@
/**
* https://nuxtjs.org/docs/configuration-glossary/configuration-router/#scrollbehavior
* always scrollToTop but on index page
*/
export default function (to, _from, savedPosition) {
if (to.name === 'index') {
return savedPosition
}
return { x: 0, y: 0 }
}