Closed postatum closed 3 years ago
If it has a toString()
I think it should be left alone, 0
is an unusual input but no need to reject it. I suggest testing with == null
instead. This matches only null
and undefined
which are the only cases that don't support toString()
and thus have trouble.
If it has a toString() I think it should be left alone, 0 is an unusual input but no need to reject it. I suggest testing with == null instead. This matches only null and undefined which are the only cases that don't support toString() and thus have trouble.
I see. I've changed the test to == null
.
Would you kindly add a changelog entry? Thank you!
Done. Please let me know if that's an OK description.
Note that nullish values also include 0, but according to this comment of a repo member: