Skip to content

Commit

Permalink
Add a default value for context in StaticRouter.navigateTo (#6698)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanvyj authored and timdorr committed Apr 9, 2019
1 parent f7c8e56 commit 3ccbd19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-router/modules/StaticRouter.js
Expand Up @@ -52,7 +52,7 @@ function noop() {}
*/
class StaticRouter extends React.Component {
navigateTo(location, action) {
const { basename = "", context } = this.props;
const { basename = "", context = {} } = this.props;
context.action = action;
context.location = addBasename(basename, createLocation(location));
context.url = createURL(context.location);
Expand Down

0 comments on commit 3ccbd19

Please sign in to comment.