mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-21 15:42:31 -05:00
Fix scroll behaviour between pages
This commit is contained in:
parent
23a1bf6ab8
commit
e67a816b5a
1 changed files with 2 additions and 2 deletions
|
@ -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 };
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue