Skip to content

Commit

Permalink
use isObject
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Trinidad committed Jun 11, 2019
1 parent c9d1aff commit ba37ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest-snapshot/src/utils.ts
Expand Up @@ -189,7 +189,7 @@ const deepMergeArray = (target: Array<any>, source: Array<any>) => {
if (Array.isArray(target[index])) {
// Target is an array
mergedOutput[index] = deepMergeArray(target[index], sourceElement);
} else if (targetElementType === 'object') {
} else if (isObject(targetElementType)) {
// Target is a (non-array) object - recursively merge
mergedOutput[index] = deepMerge(target[index], sourceElement);
} else {
Expand Down

0 comments on commit ba37ba8

Please sign in to comment.