Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This PR fixes a bug on utility validators where any parameters validated with
assertIs
would fail asserting Arrays because of unguardedisNaN
call.Why?
I don't really know how this is working at all for anyone, since I don't know how
isNaN
could return false for anything but a number.How?
globalThis.isNaN
since it is meant to check values of ANY type. UseNumber.isNaN
instead. This alone should do the trick anyway.Testing?
I'm pretty confidente that the this PR won't break anything. What I don't know is how is working anywhere, haha
New Dependencies?
Screenshots
Suggested Reading?
https://stackoverflow.com/questions/33164725/confusion-between-isnan-and-number-isnan-in-javascript
Anything Else?
Checklist