Collect subnodes passing the test, not the node with the subnodes passing the test.

This commit is contained in:
Kiel Gillard
2016-06-27 11:29:28 +10:00
parent ae87717263
commit 56a5343496

View File

@@ -144,7 +144,7 @@ static void _ASDisplayNodeFindAllSubnodes(NSMutableArray *array, ASDisplayNode *
for (ASDisplayNode *subnode in node.subnodes) {
if (block(subnode)) {
[array addObject:node];
[array addObject:subnode];
}
_ASDisplayNodeFindAllSubnodes(array, subnode, block);