Skip to content

Commit

Permalink
fix: QTree children type safety #15991 (#15992)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Jun 22, 2023
1 parent 8653eb0 commit b92d3b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/components/tree/QTree.js
Expand Up @@ -140,7 +140,7 @@ export default createComponent({
const tickStrategy = node.tickStrategy || (parent ? parent.tickStrategy : props.tickStrategy)
const
key = node[ props.nodeKey ],
isParent = node[ props.childrenKey ] && node[ props.childrenKey ].length !== 0,
isParent = node[ props.childrenKey ] && Array.isArray(node[ props.childrenKey ]) && node[ props.childrenKey ].length !== 0,
selectable = node.disabled !== true && hasSelection.value === true && node.selectable !== false,
expandable = node.disabled !== true && node.expandable !== false,
hasTicking = tickStrategy !== 'none',
Expand Down

0 comments on commit b92d3b0

Please sign in to comment.