Skip to content

Commit edca66c

Browse files
committed
fix(experimental): isActive with custom params
1 parent 8d7709b commit edca66c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/router/src/RouterLink.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ function includesParams(
442442
if (
443443
!isArray(outerValue) ||
444444
outerValue.length !== innerValue.length ||
445-
innerValue.some((value, i) => value !== outerValue[i])
445+
innerValue.some(
446+
(value, i) => value.valueOf() !== outerValue[i].valueOf()
447+
)
446448
)
447449
return false
448450
}

packages/router/src/location.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function isSameRouteLocationParamsValue(
219219
? isEquivalentArray(a, b)
220220
: isArray(b)
221221
? isEquivalentArray(b, a)
222-
: a === b
222+
: a?.valueOf() === b?.valueOf()
223223
}
224224

225225
/**

0 commit comments

Comments
 (0)