Fix test fails in old IE.

This commit is contained in:
John-David Dalton
2014-12-14 13:03:26 -08:00
parent c61fed32db
commit 7464d82243

View File

@@ -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);
} }