You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
coerceNumberProperty(thing, undefined) works the same way as coerceNumberProperty(thing), so it yields 0 if the thing isn't coercible to number. This is quite unexpected, because:
In all other cases the fallback argument is respected.
The return type is different: coerceNumberProperty(thing, undefined) returns number | undefined, even though the implementation always yields number.
Reproduction
StackBlitz link:
Steps to reproduce:
1.
2.
Expected Behavior
Fallback argument should be respected even for undefined.