Skip to content

Commit

Permalink
Merge pull request #140 from SpeciesFileGroup/development
Browse files Browse the repository at this point in the history
Fix router scroll
  • Loading branch information
jlpereira authored Sep 12, 2023
2 parents 97afafc + 111877f commit 365a922
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export function createRouter() {
history: getHistory(),
routes,
scrollBehavior(to, from, savedPosition) {
if (to.hash) {
return { el: to.hash }
}
return to.hash
? { el: to.hash }
: { top: 0 }
}
})
}

0 comments on commit 365a922

Please sign in to comment.