mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 18:37:50 +00:00
Fix test fails in old IE.
This commit is contained in:
10
lodash.js
10
lodash.js
@@ -1596,7 +1596,7 @@
|
|||||||
* @returns {Object} Returns the new converted object.
|
* @returns {Object} Returns the new converted object.
|
||||||
*/
|
*/
|
||||||
function argsToObject(args) {
|
function argsToObject(args) {
|
||||||
var result = {};
|
var result = { 'length': 0 };
|
||||||
push.apply(result, args);
|
push.apply(result, args);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -2272,10 +2272,10 @@
|
|||||||
othType = typeof other;
|
othType = typeof other;
|
||||||
|
|
||||||
// Exit early for unlike primitive values.
|
// Exit early for unlike primitive values.
|
||||||
if (value === value && other === other &&
|
if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
|
||||||
((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
|
value == null || other == null) {
|
||||||
value == null || other == null)) {
|
// Return `false` unless both values are `NaN`.
|
||||||
return false;
|
return value !== value && other !== other;
|
||||||
}
|
}
|
||||||
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB);
|
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user