Permalink
Browse files

use _.isNumber for correctly working check

  • Loading branch information...
1 parent 4266d91 commit ee86820473b355af0a7fede78d7d948083a4ea46 @octatone committed Mar 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 underscore.js
View
@@ -814,7 +814,7 @@
// Is a givin number finite?
_.isFinite = function(obj) {
- return obj > -1/0 && obj < 1/0 && obj === +obj;
+ return _.isNumber(obj) && isFinite(obj);
};
// Is the given value `NaN`?

0 comments on commit ee86820

Please sign in to comment.