diff --git a/src/main.js b/src/main.js index 3730435e..965d1158 100644 --- a/src/main.js +++ b/src/main.js @@ -23,11 +23,9 @@ const router = createRouter({ routes: routes, scrollBehavior(to, from, savedPosition) { if (to.hash) { - return { - el: to.hash, - behavior: 'smooth' - } + return { el: to.hash, behavior: 'smooth' } } + return { top: 0, behavior: 'smooth' } } })