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