diff --git a/packages/nuxt/src/pages/runtime/router.options.ts b/packages/nuxt/src/pages/runtime/router.options.ts index 0fe3f4de76b3..8703a3b518dc 100644 --- a/packages/nuxt/src/pages/runtime/router.options.ts +++ b/packages/nuxt/src/pages/runtime/router.options.ts @@ -63,6 +63,5 @@ function _getHashElementScrollMarginTop (selector: string): number { } function _isDifferentRoute (from: RouteLocationNormalized, to: RouteLocationNormalized): boolean { - const isSamePath = to.path === from.path - return !isSamePath || JSON.stringify(from.params) !== JSON.stringify(to.params) + return to.path !== from.path || JSON.stringify(from.params) !== JSON.stringify(to.params) }