Fix scroll behaviour between pages

This commit is contained in:
Kevin MacMartin 2022-07-12 00:16:46 -04:00
parent 23a1bf6ab8
commit e67a816b5a

View file

@ -58,10 +58,10 @@ const router = new createRouter({
scrollBehavior(to, from, savedPosition) {
if (to.hash) {
return {
selector: `[id='${to.hash.slice(1)}']`
el: `[id='${to.hash.slice(1)}']`
};
} else {
return { x: 0, y: 0 };
return { top: 0 };
}
}
});