소스 검색

fix React.cloneElement in component DescriptionList (#1428)

Liu Yue 8 년 전
부모
커밋
abd2dd8d5a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/components/DescriptionList/DescriptionList.js

+ 1 - 1
src/components/DescriptionList/DescriptionList.js

@@ -22,7 +22,7 @@ const DescriptionList = ({
     <div className={clsString} {...restProps}>
       {title ? <div className={styles.title}>{title}</div> : null}
       <Row gutter={gutter}>
-        {React.Children.map(children, child => React.cloneElement(child, { column }))}
+        {React.Children.map(children, child => child ? React.cloneElement(child, { column }) : child)}
       </Row>
     </div>
   );