Skip to content

Commit 44b0e6a

Browse files
committed
Merge pull request #95 from benjohnson/activeroute-multiple-children
activeRoute actually needs to support multiple children.
2 parents 680af7d + 5115866 commit 44b0e6a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/components/Route.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,9 @@ function computeHandlerProps(matches, query) {
447447
props.activeRoute = emptyFunction.thatReturnsNull;
448448
}
449449

450-
childHandler = function (props, addedProps, children) {
451-
return route.props.handler(mergeProperties(props, addedProps), children);
450+
childHandler = function (props, addedProps) {
451+
var children = Array.prototype.slice.call(arguments, 2);
452+
return route.props.handler.apply(null, [mergeProperties(props, addedProps)].concat(children));
452453
}.bind(this, props);
453454

454455
match.refName = props.ref;

0 commit comments

Comments
 (0)