Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Fix getNodeDataAtTreeIndexOrNextIndex for when node is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
bentron2000 authored and nosferatu500 committed Jul 19, 2022
1 parent adc0ccf commit 4ca5c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/tree-data-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const getNodeDataAtTreeIndexOrNextIndex = ({
}

// Add one and continue for nodes with no children or hidden children
if (!node.children || (ignoreCollapsed && node.expanded !== true)) {
if (!node?.children || (ignoreCollapsed && node?.expanded !== true)) {
return { nextIndex: currentIndex + 1 }
}

Expand Down

0 comments on commit 4ca5c7d

Please sign in to comment.