Skip to content

Commit

Permalink
fix(Grid): error thrown if children have null
Browse files Browse the repository at this point in the history
  • Loading branch information
Hector-Chong authored and Pilotager committed Mar 6, 2024
1 parent 1588887 commit 25abe72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/grid/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function Grid(props: GridProps) {
const children = useMemo(
() =>
Children.map(childrenProp, (item, index) =>
cloneElement(item as ReactElement, { __dataIndex__: index }),
item ? cloneElement(item as ReactElement, { __dataIndex__: index }) : null,
),
[childrenProp],
)
Expand Down

0 comments on commit 25abe72

Please sign in to comment.