diff --git a/src/checkbox/CheckboxGroup.tsx b/src/checkbox/CheckboxGroup.tsx index 399d5e6ee6..54577b1b8f 100644 --- a/src/checkbox/CheckboxGroup.tsx +++ b/src/checkbox/CheckboxGroup.tsx @@ -52,7 +52,7 @@ const CheckboxGroup = (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 = [];