From 7464d82243669a619bd249a18656b0813c5009f4 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 14 Dec 2014 13:03:26 -0800 Subject: [PATCH] Fix test fails in old IE. --- lodash.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lodash.js b/lodash.js index 95188e976..30981cc10 100644 --- a/lodash.js +++ b/lodash.js @@ -1596,7 +1596,7 @@ * @returns {Object} Returns the new converted object. */ function argsToObject(args) { - var result = {}; + var result = { 'length': 0 }; push.apply(result, args); return result; } @@ -2272,10 +2272,10 @@ othType = typeof other; // Exit early for unlike primitive values. - if (value === value && other === other && - ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') || - value == null || other == null)) { - return false; + if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') || + value == null || other == null) { + // Return `false` unless both values are `NaN`. + return value !== value && other !== other; } return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB); }