Skip to content

Commit

Permalink
use _.isNumber for correctly working check
Browse files Browse the repository at this point in the history
  • Loading branch information
octatone committed Mar 26, 2012
1 parent 4266d91 commit ee86820
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion underscore.js
Expand Up @@ -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`?
Expand Down

0 comments on commit ee86820

Please sign in to comment.