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
The regex for isDecimal incorrectly results in true for an empty string. Since your toString function transforms null, undefined and NaN values to empty strings, these also result in a returned value of true. You should check for str !== '' before testing the regex like you do in isFloat.
The text was updated successfully, but these errors were encountered:
The regex for isDecimal incorrectly results in true for an empty string. Since your toString function transforms null, undefined and NaN values to empty strings, these also result in a returned value of true. You should check for str !== '' before testing the regex like you do in isFloat.
The text was updated successfully, but these errors were encountered: