Ensure _.merge merges plain-objects onto non plain-objects. [closes #1413]

This commit is contained in:
John-David Dalton
2015-08-27 09:21:37 -07:00
parent dfebb83c35
commit ce4f2f1326
2 changed files with 34 additions and 17 deletions

View File

@@ -2315,7 +2315,7 @@
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = isArguments(oldValue)
? toPlainObject(oldValue)
: (isPlainObject(oldValue) ? oldValue : {});
: (isObject(oldValue) ? oldValue : {});
}
else {
isCommon = isFunction(srcValue);