mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
use _.isNumber for correctly working check
This commit is contained in:
@@ -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`?
|
||||||
|
|||||||
Reference in New Issue
Block a user