@@ -20,7 +20,7 @@ import {
2020import { isTrackAll } from "@next-core/cook" ;
2121import { hasOwnProperty } from "@next-core/utils/general" ;
2222import { strictCollectMemberUsage } from "@next-core/utils/storyboard" ;
23- import { debounce , isEqual } from "lodash" ;
23+ import { debounce , isEqual , omitBy } from "lodash" ;
2424import { asyncCheckBrickIf } from "./compute/checkIf.js" ;
2525import {
2626 asyncComputeRealPropertyEntries ,
@@ -940,7 +940,7 @@ async function legacyRenderBrick(
940940 ) ) &&
941941 ( newMatch = matchRoute ( route , homepage , pathname ) ) &&
942942 ( route !== parentRoute ||
943- isEqual ( prevMatch . params , newMatch . params ) )
943+ isRouteParamsEqual ( prevMatch . params , newMatch . params ) )
944944 ) ;
945945 } )
946946 ) {
@@ -1343,3 +1343,18 @@ function catchLoad(
13431343 } )
13441344 : promise ;
13451345}
1346+
1347+ function isRouteParamsEqual (
1348+ a : Record < string , string > ,
1349+ b : Record < string , string >
1350+ ) {
1351+ if ( isEqual ( a , b ) ) {
1352+ return true ;
1353+ }
1354+ const omitNumericKeys = ( v : unknown , k : string ) => {
1355+ return String ( Number ( k ) ) === k ;
1356+ } ;
1357+ const c = omitBy ( a , omitNumericKeys ) ;
1358+ const d = omitBy ( b , omitNumericKeys ) ;
1359+ return isEqual ( c , d ) ;
1360+ }
0 commit comments