We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5145d99 commit c6f4ad7Copy full SHA for c6f4ad7
src/utils/warningPropsUtil.ts
@@ -104,7 +104,7 @@ function warningProps(props: SelectProps) {
104
if (children) {
105
let invalidateChildType = null;
106
toNodeArray(children).some((node: React.ReactNode) => {
107
- if (!React.isValidElement(node)) {
+ if (!React.isValidElement(node) || !node.type) {
108
return false;
109
}
110
@@ -118,6 +118,7 @@ function warningProps(props: SelectProps) {
118
(subNode: React.ReactElement) => {
119
if (
120
!React.isValidElement(subNode) ||
121
+ !node.type ||
122
(subNode.type as { isSelectOption?: boolean }).isSelectOption
123
) {
124
return true;
0 commit comments