Skip to content

Commit c7ba450

Browse files
committed
fix: avoid breaking older browsers support
Fix vuejs/vue-router#3938
1 parent 4309554 commit c7ba450

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/router/src/location.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ function isSameRouteLocationParamsValue(
219219
? isEquivalentArray(a, b)
220220
: isArray(b)
221221
? isEquivalentArray(b, a)
222-
: a?.valueOf() === b?.valueOf()
222+
: // TODO: update to ?.valueOf() when we target ES2020
223+
(a && a.valueOf()) === (b && b.valueOf())
223224
}
224225

225226
/**

0 commit comments

Comments
 (0)