mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +00:00
perf(nuxt): use simple JSON.stringify
to compare params (#8340)
This commit is contained in:
parent
9415f54a1a
commit
0f2ef5d412
@ -1,6 +1,5 @@
|
||||
import type { RouterConfig } from '@nuxt/schema'
|
||||
import type { RouterScrollBehavior, RouteLocationNormalized } from 'vue-router'
|
||||
import { isEqual } from 'ohash'
|
||||
import { nextTick } from 'vue'
|
||||
import { useNuxtApp } from '#app'
|
||||
|
||||
@ -59,7 +58,7 @@ function _isDifferentRoute (a: RouteLocationNormalized, b: RouteLocationNormaliz
|
||||
if (!samePageComponent) {
|
||||
return true
|
||||
}
|
||||
if (samePageComponent && !isEqual(a.params, b.params)) {
|
||||
if (samePageComponent && JSON.stringify(a.params) !== JSON.stringify(b.params)) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user