Skip to content

Commit 43b118f

Browse files
fix(router): sync current route for the same component
1 parent b37fd1a commit 43b118f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/runtime/router.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ export default defineNuxtPlugin(async nuxtApp => {
6969
router.afterEach((to, from) => {
7070
// We won't trigger suspense if the component is reused between routes
7171
// so we need to update the route manually
72-
if (to.matched[0]?.components?.default === from.matched[0]?.components?.default) {
73-
syncCurrentRoute()
74-
}
72+
syncCurrentRoute()
7573
})
7674

7775
// https://github.com/vuejs/router/blob/main/packages/router/src/router.ts#L1225-L1233

0 commit comments

Comments
 (0)