Skip to content

Commit 3ccbd19

Browse files
sumanvyjtimdorr
authored andcommittedApr 9, 2019
Add a default value for context in StaticRouter.navigateTo (#6698)
1 parent f7c8e56 commit 3ccbd19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/react-router/modules/StaticRouter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function noop() {}
5252
*/
5353
class StaticRouter extends React.Component {
5454
navigateTo(location, action) {
55-
const { basename = "", context } = this.props;
55+
const { basename = "", context = {} } = this.props;
5656
context.action = action;
5757
context.location = addBasename(basename, createLocation(location));
5858
context.url = createURL(context.location);

0 commit comments

Comments
 (0)
Please sign in to comment.