Skip to content

Commit

Permalink
fix(DefinitionList): children に null が渡ってきた場合の不具合を修正 (#5105)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Nov 13, 2024
1 parent 71b08a0 commit fbc2902
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,14 @@ export const DefinitionList: FC<Props & ElementProps> = ({
termStyleType={termStyleType}
/>
))}
{React.Children.map(children, (child) =>
React.cloneElement(child as React.ReactElement, {
maxColumns,
termStyleType,
}),
{React.Children.map(
children,
(child) =>
React.isValidElement(child) &&
React.cloneElement(child as React.ReactElement, {
maxColumns,
termStyleType,
}),
)}
</Cluster>
)
Expand Down

0 comments on commit fbc2902

Please sign in to comment.