From 412290bcd2045eed8bdf50bf20a3dcf9cddafab8 Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Fri, 18 Jul 2014 16:03:20 -0400 Subject: [PATCH 1/2] activeRoute should be a function returning null when no route. --- modules/components/Route.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/components/Route.js b/modules/components/Route.js index ba17868a2d..93b6e3e5ef 100644 --- a/modules/components/Route.js +++ b/modules/components/Route.js @@ -443,7 +443,7 @@ function computeHandlerProps(matches, query) { if (childHandler) { props.activeRoute = childHandler; } else { - props.activeRoute = null; + props.activeRoute = function() { return null; }; } childHandler = function (props, addedProps, children) { From b486ea1d78c4183707fbf20fbf36deee5e792d0f Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Fri, 18 Jul 2014 16:03:59 -0400 Subject: [PATCH 2/2] activeRoute actually needs to support multiple children. Much thanks to @luigy and @rpflorence. --- modules/components/Route.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/components/Route.js b/modules/components/Route.js index 93b6e3e5ef..f105c46f66 100644 --- a/modules/components/Route.js +++ b/modules/components/Route.js @@ -447,7 +447,7 @@ function computeHandlerProps(matches, query) { } childHandler = function (props, addedProps, children) { - return route.props.handler(mergeProperties(props, addedProps), children); + return route.props.handler.apply(null, [mergeProperties(props, addedProps)].concat(children)); }.bind(this, props); match.refName = props.ref;