diff --git a/packages/enzyme/src/selectors.js b/packages/enzyme/src/selectors.js index 71adefc68..7967380de 100644 --- a/packages/enzyme/src/selectors.js +++ b/packages/enzyme/src/selectors.js @@ -334,7 +334,7 @@ function matchDirectChild(nodes, predicate) { function matchDescendant(nodes, predicate) { return uniqueReduce( (matches, node) => matches.concat(treeFilter(node, predicate)), - nodes, + flatten(nodes.map(childrenOfNode)), ); }