Skip to content

Commit

Permalink
merge: copy function values independent of source index (lodash#4429)
Browse files Browse the repository at this point in the history
* merge: copy function values independent of source index

* Enable merge tests
  • Loading branch information
blikblum authored and jdalton committed Aug 22, 2019
1 parent 2cf08be commit 1011cfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .internal/baseMergeDeep.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/merge.js → test/merge.test.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
1 change: 1 addition & 0 deletions test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ export {
params,
push,
realm,
root,
slice,
strictArgs,
arrayBuffer,
Expand Down

0 comments on commit 1011cfd

Please sign in to comment.