Skip to content

Commit

Permalink
fix(uncontrolled-tree-env): add additonal optional chaining for undef…
Browse files Browse the repository at this point in the history
…ined (#356)
  • Loading branch information
kherP authored Apr 4, 2024
1 parent 722dcaf commit 6ad1edb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const UncontrolledTreeEnvironment = React.forwardRef<
// move old items out
for (const item of items) {
const parent = Object.values(currentItems).find(potentialParent =>
potentialParent.children?.includes(item.index)
potentialParent?.children?.includes?.(item.index)
);

if (!parent) {
Expand Down

0 comments on commit 6ad1edb

Please sign in to comment.