Ensure _.defaultsDeep doesn't attempt a merge of a string into an array. [closes #1560]

This commit is contained in:
John-David Dalton
2015-10-24 15:15:06 -07:00
parent 182b29662d
commit 89279009d8
2 changed files with 10 additions and 4 deletions

View File

@@ -4841,7 +4841,7 @@
* @returns {*} Returns the value to assign to the destination object.
*/
function mergeDefaults(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue)) {
if (isObject(objValue) && isObject(srcValue)) {
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, mergeDefaults, stack);
}