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
|
// Scroll to anchor should still work
|
||||||
if (to.hash) {
|
if (to.hash) {
|
||||||
return {el: document.getElementById(to.hash.slice(1))}
|
return {el: to.hash}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise just scroll to the top
|
// Otherwise just scroll to the top
|
||||||
|
|
Loading…
Add table
Reference in a new issue