Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit dbda3cd

Browse files
committed
fix: perf containerNode => search in descendents / children
1 parent 4929b5e commit dbda3cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/VNodes/ContainerNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class ContainerNode extends AbstractNode {
9797
firstDescendant(predicate?: Predicate): VNode;
9898
firstDescendant(predicate?: Predicate): VNode {
9999
let firstDescendant = this.firstChild();
100-
while (firstDescendant && predicate && firstDescendant.test(predicate)) {
100+
while (firstDescendant && predicate && !firstDescendant.test(predicate)) {
101101
firstDescendant = this._descendantAfter(firstDescendant);
102102
}
103103
return firstDescendant;

0 commit comments

Comments
 (0)