Skip to content

Commit ac9939e

Browse files
fix infinity normalization
1 parent f452357 commit ac9939e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/utils/src/normalize.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ function visit(
8181
// Get the simple cases out of the way first
8282
if (
8383
value == null || // this matches null and undefined -> eqeq not eqeqeq
84-
(['number', 'boolean', 'string'].includes(typeof value) && Number.isFinite(value))
84+
(['boolean', 'string'].includes(typeof value) ||
85+
(typeof value === 'number' && Number.isFinite(value)))
8586
) {
8687
return value as Primitive;
8788
}

0 commit comments

Comments
 (0)