From 1a65f5b39543ddb8dd02d8da3113847f2053afb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Tue, 5 Dec 2017 18:43:19 +0800 Subject: [PATCH] fix component Children map error (#368) --- src/components/NoticeIcon/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NoticeIcon/index.js b/src/components/NoticeIcon/index.js index 80ac2c16..3134aced 100644 --- a/src/components/NoticeIcon/index.js +++ b/src/components/NoticeIcon/index.js @@ -40,7 +40,7 @@ export default class NoticeIcon extends PureComponent { if (!children) { return null; } - const panes = children.map((child) => { + const panes = React.Children.map(children, (child) => { const title = child.props.list && child.props.list.length > 0 ? `${child.props.title} (${child.props.list.length})` : child.props.title; return ( -- GitLab