Skip to content

Commit 95bc058

Browse files
authored
Merge pull request #165 from betterRunner/bug-fix-hasInGenerations
Bug fix hasInGenerations
2 parents 0dcc9e8 + 4259508 commit 95bc058

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,13 +17,14 @@ 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
2626
}
27+
return ret
2728
}
2829

2930
export default {

0 commit comments

Comments
 (0)