mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-23 09:00:31 +00:00
chore: improve condition
This commit is contained in:
parent
96c6c9269c
commit
26898c6e26
@ -64,11 +64,5 @@ function _getHashElementScrollMarginTop (selector: string): number {
|
||||
|
||||
function _isDifferentRoute (from: RouteLocationNormalized, to: RouteLocationNormalized): boolean {
|
||||
const isSamePath = to.path === from.path
|
||||
|
||||
if (!isSamePath) {
|
||||
return true
|
||||
} else if (JSON.stringify(from.params) !== JSON.stringify(to.params)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return !isSamePath || JSON.stringify(from.params) !== JSON.stringify(to.params)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user