浏览代码

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>
   );