diff --git a/packages/nuxt/src/pages/runtime/router.options.ts b/packages/nuxt/src/pages/runtime/router.options.ts index 42de00df3d..b1d22573c0 100644 --- a/packages/nuxt/src/pages/runtime/router.options.ts +++ b/packages/nuxt/src/pages/runtime/router.options.ts @@ -63,7 +63,7 @@ function _getHashElementScrollMarginTop (selector: string): number { } function _isDifferentRoute (from: RouteLocationNormalized, to: RouteLocationNormalized): boolean { - const samePageComponent = to.matched.every((comp, index) => comp.components?.default === from.matched[index]?.components?.default) + const samePageComponent = to.path === from.path if (!samePageComponent) { return true