Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix: only scroll to top for non children
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Oct 19, 2022
1 parent 9240ba8 commit 3ec9051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/pages/runtime/router.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default <RouterConfig> {
let position: ScrollPosition = savedPosition || undefined

// Scroll to top if route is changed by default
if (!position && to !== from) {
if (!position && from.matched[0] !== to.matched[0]) {
position = { left: 0, top: 0 }
}

Expand Down

0 comments on commit 3ec9051

Please sign in to comment.