Skip to content

Commit

Permalink
fix(CheckoutGroup): fix CheckoutGroup displayName (#3257)
Browse files Browse the repository at this point in the history
Co-authored-by: Heising <[email protected]>
  • Loading branch information
HaixingOoO and Heising authored Dec 3, 2024
1 parent d184f9f commit bdef4e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/checkbox/CheckboxGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const CheckboxGroup = <T extends CheckboxGroupValue = CheckboxGroupValue>(props:
? options
: React.Children.map(
children,
(child: JSX.Element) => child.type.displayName === Checkbox.displayName && (child as ReactElement).props,
(child: JSX.Element) => child?.type?.displayName === Checkbox.displayName && (child as ReactElement).props,
) || [];

const optionsWithoutCheckAll = intervalOptions.filter((t) => typeof t !== 'object' || !t.checkAll);
Expand Down

0 comments on commit bdef4e9

Please sign in to comment.