Browse Source

Fix FormItem error with react-hot-loader, close #7775

pull/7794/head
afc163 7 years ago
parent
commit
185b3b1e9a
  1. 3
      components/form/FormItem.tsx

3
components/form/FormItem.tsx

@ -89,7 +89,8 @@ export default class FormItem extends React.Component<FormItemProps, any> {
}
const child = childrenArray[i] as React.ReactElement<any>;
if (child.type as any === FormItem) {
if (child.type &&
(child.type as any === FormItem || (child.type as any).displayName === 'FormItem')) {
continue;
}
if (!child.props) {

Loading…
Cancel
Save