Skip to content

Commit d82d049

Browse files
committed
fix(hasLeaves): allow null
1 parent 62ccc17 commit d82d049

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common/util/tree/hasLeaves.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Nullish } from '@table-library/react-table-library/types/common';
12
import { TableNode } from '@table-library/react-table-library/types/table';
23

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

0 commit comments

Comments
 (0)