fix: use to.hash for returned element
This commit is contained in:
parent
de3c47dc69
commit
6894024ad4
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue