diff --git a/src/hooks/useTreeData.ts b/src/hooks/useTreeData.ts index 3102bf87..3b93abbb 100644 --- a/src/hooks/useTreeData.ts +++ b/src/hooks/useTreeData.ts @@ -100,7 +100,7 @@ function formatTreeData( valueSet.add(value); } - if (node[fieldChildren] !== undefined) { + if (node[fieldChildren] !== undefined && node[fieldChildren] !== null) { dataNode.children = dig(node[fieldChildren]); }