From c3ef8ade70b9ccdefc272cfd49be443f0193e2af Mon Sep 17 00:00:00 2001 From: julien huang Date: Sun, 30 Jul 2023 18:03:33 +0200 Subject: [PATCH] fix(nuxt): fix isDifferentRoute util in router.oiptions --- packages/nuxt/src/pages/runtime/router.options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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