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
No known key found for this signature in database
GPG key ID: B257AC0149F43A77

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