switching to canonical isNaN

This commit is contained in:
Jeremy Ashkenas
2010-12-20 16:42:54 -05:00
parent d2d6cfe667
commit 2dff99d518

View File

@@ -616,7 +616,7 @@
// Is the given value NaN -- this one is interesting. NaN != NaN, and
// isNaN(undefined) == true, so we make sure it's a number first.
_.isNaN = function(obj) {
return toString.call(obj) === '[object Number]' && isNaN(obj);
return obj !== obj;
};
// Is a given value a boolean?