mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Ensure _.defaultsDeep doesn't attempt a merge of a string into an array. [closes #1560]
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user