Skip to content

Commit e8eb2d1

Browse files
committed
Only children again.
1 parent 1aee95f commit e8eb2d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/react-router/modules/Router.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ class Router extends React.Component {
7777
}
7878

7979
render() {
80-
return RouterContext.provide(this.getChildContext(), this.props.children);
80+
const { children } = this.props;
81+
return RouterContext.provide(
82+
this.getChildContext(),
83+
children ? React.Children.only(children) : null
84+
);
8185
}
8286
}
8387

0 commit comments

Comments
 (0)