use _.isNumber for correctly working check

This commit is contained in:
Raymond May Jr
2012-03-26 13:02:40 -05:00
parent 4266d91805
commit ee86820473

View File

@@ -814,7 +814,7 @@
// Is a givin number finite? // Is a givin number finite?
_.isFinite = function(obj) { _.isFinite = function(obj) {
return obj > -1/0 && obj < 1/0 && obj === +obj; return _.isNumber(obj) && isFinite(obj);
}; };
// Is the given value `NaN`? // Is the given value `NaN`?