From 3ccbd191328d4a5ecf6651bae62283cf1aa1c477 Mon Sep 17 00:00:00 2001 From: Suman Jandhyala Date: Tue, 9 Apr 2019 16:49:52 -0700 Subject: [PATCH] Add a default value for context in StaticRouter.navigateTo (#6698) --- packages/react-router/modules/StaticRouter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-router/modules/StaticRouter.js b/packages/react-router/modules/StaticRouter.js index ae176c6e12..1a3d938614 100644 --- a/packages/react-router/modules/StaticRouter.js +++ b/packages/react-router/modules/StaticRouter.js @@ -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);