Skip to content

Commit 16fee62

Browse files
committed
fix(getExtendedNodes): parentNode is null in first iteration
1 parent 07c9cb5 commit 16fee62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/util/tree/getExtendedNodes.ts

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

3-
export const getExtendedNodes = (nodes: TableNode[], parentNode: TableNode): TableNode[] => {
3+
export const getExtendedNodes = (nodes: TableNode[], parentNode: TableNode | null): TableNode[] => {
44
const extendedNodes = nodes.map((node) => ({
55
...node,
66
ancestors: parentNode ? parentNode.ancestors.concat(node) : [node],

0 commit comments

Comments
 (0)