diff --git a/src/utils/helper.ts b/src/utils/helper.ts index 5783e5e92..17baaf104 100644 --- a/src/utils/helper.ts +++ b/src/utils/helper.ts @@ -929,7 +929,17 @@ export function someTree( tree: Array, iterator: (item: T, key: number, level: number, paths: Array) => boolean ): boolean { - return !everyTree(tree, iterator); + let result = false; + + everyTree(tree, (item: T, key: number, level: number, paths: Array) => { + if (iterator(item, key, level, paths)) { + result = true; + return false; + } + return true; + }); + + return result; } /**