mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -05:00
Fix back button scroll behaviour
This commit is contained in:
parent
873a45dc32
commit
31fb84f579
1 changed files with 2 additions and 0 deletions
|
@ -60,6 +60,8 @@ const router = new createRouter({
|
||||||
return {
|
return {
|
||||||
el: `[id='${to.hash.slice(1)}']`
|
el: `[id='${to.hash.slice(1)}']`
|
||||||
};
|
};
|
||||||
|
} else if (savedPosition) {
|
||||||
|
return savedPosition;
|
||||||
} else {
|
} else {
|
||||||
return { top: 0 };
|
return { top: 0 };
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue