mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -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) {
|
scrollBehavior(to, from, savedPosition) {
|
||||||
if (to.hash) {
|
if (to.hash) {
|
||||||
return {
|
return {
|
||||||
selector: `[id='${to.hash.slice(1)}']`
|
el: `[id='${to.hash.slice(1)}']`
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return { x: 0, y: 0 };
|
return { top: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue