We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f452357 commit ac9939eCopy full SHA for ac9939e
packages/utils/src/normalize.ts
@@ -81,7 +81,8 @@ function visit(
81
// Get the simple cases out of the way first
82
if (
83
value == null || // this matches null and undefined -> eqeq not eqeqeq
84
- (['number', 'boolean', 'string'].includes(typeof value) && Number.isFinite(value))
+ (['boolean', 'string'].includes(typeof value) ||
85
+ (typeof value === 'number' && Number.isFinite(value)))
86
) {
87
return value as Primitive;
88
}
0 commit comments