Skip to content

Commit

Permalink
chore: simplify slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Sep 6, 2023
1 parent eeada97 commit e01fc19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/nuxt/src/pages/runtime/router.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit e01fc19

Please sign in to comment.