Skip to content

Commit 2b43781

Browse files
committed
fix: mixins-hasInGenerations logic bug
1 parent 0dcc9e8 commit 2b43781

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/mixins.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ function getDragNode (guid) {
1717
}
1818

1919
function hasInGenerations (root, node) {
20+
let ret = false
2021
if (root.hasOwnProperty('children') && root.children) {
2122
for (let rn of root.children) {
2223
if (rn === node) return true
23-
if (rn.children) return hasInGenerations(rn, node)
24+
if (rn.children) ret |= hasInGenerations(rn, node)
2425
}
25-
return false
26+
return ret
2627
}
2728
}
2829

0 commit comments

Comments
 (0)