From 2dff99d518a7fc3024334b9c517338e9c2557157 Mon Sep 17 00:00:00 2001 From: Jeremy Ashkenas Date: Mon, 20 Dec 2010 16:42:54 -0500 Subject: [PATCH] switching to canonical isNaN --- underscore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore.js b/underscore.js index cf11afb5f..319fc789b 100644 --- a/underscore.js +++ b/underscore.js @@ -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?