diff --git a/components/tabs/index.jsx b/components/tabs/index.jsx index 7ee6c9dc4..be2e4eace 100644 --- a/components/tabs/index.jsx +++ b/components/tabs/index.jsx @@ -1,5 +1,5 @@ import RcTabs from 'rc-tabs'; -import React, { cloneElement } from 'react'; +import React, { cloneElement, Children } from 'react'; import classNames from 'classnames'; import Icon from '../icon'; @@ -47,7 +47,7 @@ export default class Tabs extends React.Component { // only card type tabs can be added and closed if (type === 'editable-card') { children = Array.isArray(children) ? children : [children]; - children = children.map((child, index) => { + children = Children.map(children, (child, index) => { return cloneElement(child, { tab:
{child.props.tab}