From 585d8ec4e72d4cc153f68af45962cb017ec8173b Mon Sep 17 00:00:00 2001 From: Casey Foster Date: Thu, 12 Feb 2015 20:06:12 -0600 Subject: [PATCH] [fixed] Use more correct children invariant --- modules/Routing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Routing.js b/modules/Routing.js index a1d42706bc..76394c16fb 100644 --- a/modules/Routing.js +++ b/modules/Routing.js @@ -89,7 +89,7 @@ function createRoute(element, parentRoute, namedRoutes) { ); invariant( - props.children == null, + React.Children.count(props.children) === 0, ' must not have children' ); @@ -111,7 +111,7 @@ function createRoute(element, parentRoute, namedRoutes) { ); invariant( - props.children == null, + React.Children.count(props.children) === 0, ' must not have children' );