From 43b118f303f4d8039ef0f672335ee5c57108f695 Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Thu, 21 Sep 2023 10:19:39 +0200 Subject: [PATCH] fix(router): sync current route for the same component --- src/runtime/router.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/runtime/router.ts b/src/runtime/router.ts index 2cb62f85..f1ce630c 100644 --- a/src/runtime/router.ts +++ b/src/runtime/router.ts @@ -69,9 +69,7 @@ export default defineNuxtPlugin(async nuxtApp => { router.afterEach((to, from) => { // We won't trigger suspense if the component is reused between routes // so we need to update the route manually - if (to.matched[0]?.components?.default === from.matched[0]?.components?.default) { - syncCurrentRoute() - } + syncCurrentRoute() }) // https://github.com/vuejs/router/blob/main/packages/router/src/router.ts#L1225-L1233