diff --git a/src/router/index.ts b/src/router/index.ts index abeed38b..fee8fdfa 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -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