Ensure _.mergeWith sources are cloned when customizer returns undefiend. [closes #2111]

This commit is contained in:
John-David Dalton
2016-03-15 08:32:23 -07:00
parent 7d1d7d909a
commit b95d1d6123
2 changed files with 12 additions and 2 deletions

View File

@@ -3219,7 +3219,7 @@
}
else {
isCommon = false;
newValue = baseClone(srcValue, !customizer);
newValue = baseClone(srcValue, true);
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
@@ -3228,7 +3228,7 @@
}
else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
isCommon = false;
newValue = baseClone(srcValue, !customizer);
newValue = baseClone(srcValue, true);
}
else {
newValue = objValue;