fix(nuxt): fix isDifferentRoute util in router.oiptions

This commit is contained in:
julien huang 2023-07-30 18:03:33 +02:00
parent c5f94be5d1
commit c3ef8ade70

View File

@ -63,7 +63,7 @@ function _getHashElementScrollMarginTop (selector: string): number {
} }
function _isDifferentRoute (from: RouteLocationNormalized, to: RouteLocationNormalized): boolean { 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) { if (!samePageComponent) {
return true return true