Cleanup passing stack around since Stac#set returns the stack.

This commit is contained in:
John-David Dalton
2016-02-27 11:06:01 -08:00
parent 629de594d5
commit ac62c24c4a

View File

@@ -4808,10 +4808,8 @@
if (stacked) { if (stacked) {
return stacked == other; return stacked == other;
} }
stack.set(object, other);
// Recursively compare objects (susceptible to call stack limits). // Recursively compare objects (susceptible to call stack limits).
return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack); return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask | UNORDERED_COMPARE_FLAG, stack.set(object, other));
case symbolTag: case symbolTag:
if (symbolValueOf) { if (symbolValueOf) {
@@ -5375,11 +5373,9 @@
* @returns {*} Returns the value to assign. * @returns {*} Returns the value to assign.
*/ */
function mergeDefaults(objValue, srcValue, key, object, source, stack) { function mergeDefaults(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) { return (isObject(objValue) && isObject(srcValue))
stack.set(srcValue, objValue); ? baseMerge(objValue, srcValue, undefined, mergeDefaults, stack.set(srcValue, objValue))
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack); : objValue;
}
return objValue;
} }
/** /**