Skip to content

Commit 62ccc17

Browse files
committed
fix(hasLeaves): allow null as TableNode
1 parent 75d4193 commit 62ccc17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/util/tree/hasLeaves.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { TableNode } from '@table-library/react-table-library/types/table';
22

3-
export const hasLeaves = <T extends TableNode>(node: T): boolean => !!node.nodes?.length;
3+
export const hasLeaves = <T extends TableNode>(node?: T): boolean => !!node?.nodes?.length;

0 commit comments

Comments
 (0)