Skip to content

Commit

Permalink
fix(CheckboxGroup): robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
huangchen1031 committed Dec 2, 2024
1 parent 4f08a80 commit ac9f285
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 @@ -52,7 +52,7 @@ const CheckboxGroup = <T extends CheckboxGroupValue = CheckboxGroupValue>(props:
const intervalOptions =
Array.isArray(options) && options.length > 0
? options
: React.Children.map(children, (child) => (child as ReactElement).props) || [];
: React.Children.map(children, (child) => (child as ReactElement)?.props || {}) || [];

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

0 comments on commit ac9f285

Please sign in to comment.