mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-24 01:19:58 +00:00
fix(nuxt): fix isDifferentRoute util in router.oiptions
This commit is contained in:
parent
c5f94be5d1
commit
c3ef8ade70
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user