renamed isNaN warning message property #98

wants to merge 1 commit into


None yet
2 participants

ghost commented Jan 25, 2012

In the check_relation function, there is a call to warn with a 'isnan' argument if the node contains NaN:

warn('isnan', node);

However, the message bundle does not contain a property named 'isnan'. The corresponding message appears in a property named 'isNaN':

bundle = {
    isNaN: "Use the isNaN function to compare with NaN."

Validating a line such as var x = 5 > NaN; in the 2012-01-13 edition of results in this message:

Problem at line 1 character 13: isnan

I renamed the property in the message bundle. This makes the name consistent with all other property names, which are lowercase.


This comment has been minimized.

Show comment
Hide comment

douglascrockford commented Jan 25, 2012


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment