fix: use to.hash for returned element

This commit is contained in:
Dominik Pschenitschni 2022-01-30 16:48:02 +01:00
parent de3c47dc69
commit 6894024ad4
Signed by: dpschen
GPG Key ID: B257AC0149F43A77
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ const router = createRouter({
// Scroll to anchor should still work
if (to.hash) {
return {el: document.getElementById(to.hash.slice(1))}
return {el: to.hash}
}
// Otherwise just scroll to the top