merge: copy function values independent of source index (#4429)

* merge: copy function values independent of source index

* Enable merge tests
This commit is contained in:
Luiz Américo
2019-08-22 11:48:28 -03:00
committed by John-David Dalton
parent 2cf08be625
commit 1011cfdf4c
3 changed files with 3 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, sta
if (isArguments(objValue)) {
newValue = toPlainObject(objValue)
}
else if ((srcIndex && typeof objValue == 'function') || !isObject(objValue)) {
else if (typeof objValue == 'function' || !isObject(objValue)) {
newValue = initCloneObject(srcValue)
}
}

View File

@@ -1,6 +1,6 @@
import assert from 'assert';
import lodashStable from 'lodash';
import { args, typedArrays, stubTrue, defineProperty, document } from './utils.js';
import { args, typedArrays, stubTrue, defineProperty, document, root } from './utils.js';
import merge from '../merge.js';
import isArguments from '../isArguments.js';

View File

@@ -733,6 +733,7 @@ export {
params,
push,
realm,
root,
slice,
strictArgs,
arrayBuffer,