From bb5a6d9c29d0aa80b9e2510470c1476d14c1bc22 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Thu, 9 Jul 2015 18:23:34 +0800 Subject: [PATCH] fix breadcrumb warning --- components/breadcrumb/demo/router.md | 6 ------ components/breadcrumb/index.jsx | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/components/breadcrumb/demo/router.md b/components/breadcrumb/demo/router.md index 85a3cf8c06..0230435677 100644 --- a/components/breadcrumb/demo/router.md +++ b/components/breadcrumb/demo/router.md @@ -22,12 +22,6 @@ var Apps = React.createClass({ } }); -var App = React.createClass({ - render() { - return
; - } -}); - var App = React.createClass({ render() { return (
diff --git a/components/breadcrumb/index.jsx b/components/breadcrumb/index.jsx index 1ae4ef9dcf..f7cf1fb8b8 100644 --- a/components/breadcrumb/index.jsx +++ b/components/breadcrumb/index.jsx @@ -17,7 +17,7 @@ let BreadcrumbItem = React.createClass({ let Breadcrumb = React.createClass({ contextTypes: { - router: React.PropTypes.func.isRequired + router: React.PropTypes.func }, render() { var crumbs, routes, params; @@ -35,7 +35,7 @@ let Breadcrumb = React.createClass({ } else { link = {name}; } - return {link}; + return {link}; }); } else { crumbs = this.props.children;