mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 18:07:49 +00:00
Sync _.isFinite changes with Underscore and update vendor/underscore and vendor/backbone.
Former-commit-id: 9acb93a276a11da8186da76bd82f1fd6f89c27dd
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
|
||||
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
|
||||
nativeIsFinite = window.isFinite,
|
||||
nativeIsNaN = window.isNaN,
|
||||
nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys,
|
||||
nativeMax = Math.max,
|
||||
nativeMin = Math.min,
|
||||
@@ -1406,7 +1407,7 @@
|
||||
* // => false
|
||||
*/
|
||||
function isFinite(value) {
|
||||
return nativeIsFinite(value) && toString.call(value) == numberClass;
|
||||
return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user