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

Commit 4ca5c7d

Browse files
bentron2000nosferatu500
authored andcommitted
Fix getNodeDataAtTreeIndexOrNextIndex for when node is undefined
1 parent adc0ccf commit 4ca5c7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/tree-data-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const getNodeDataAtTreeIndexOrNextIndex = ({
6161
}
6262

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

0 commit comments

Comments
 (0)