Skip to content

Commit 78870f8

Browse files
committed
feat: 当node.get输入条件函数时,包括当前节点
1 parent 7e63e70 commit 78870f8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/core/src/node.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ export class FlexTreeNode<
226226
}
227227
}
228228
} else {
229+
if (condition(this)) return this
229230
this.forEach((node) => {
230231
if (condition(node)) {
231232
return node

0 commit comments

Comments
 (0)