There was an error while loading. Please reload this page.
1 parent 3fd0a55 commit ed75beaCopy full SHA for ed75bea
src/arrayToTree.ts
@@ -58,7 +58,7 @@ export function arrayToTree (items: Item[], config: Partial<Config> = {}): TreeI
58
59
const TreeItem = lookup[itemId]
60
61
- if (!parentId) {
+ if (parentId === null || parentId === undefined) {
62
// is a root item
63
rootItems.push(TreeItem)
64
} else {
0 commit comments