@@ -12,9 +12,9 @@ import {setRouteComponents, setPreviousPath} from './action';
1212export default ( formatPattern ) => {
1313 invariant (
1414 typeof formatPattern === 'function' ,
15- 'The `formatPattern` function from `react-redux` must be provided. ' +
16- 'Add `import {formatPattern} from "react-router"` and add it as the ' +
17- 'argument to your call to `createRelocationRouter`.'
15+ 'The `formatPattern` function from `react-redux` must be provided. ' +
16+ 'Add `import {formatPattern} from "react-router"` and add it as the ' +
17+ 'argument to your call to `createRelocationRouter`.'
1818 ) ;
1919
2020 const finalFormatPattern = typeof formatPattern === 'function' ?
@@ -41,7 +41,7 @@ export default (formatPattern) => {
4141 }
4242
4343 updateRouteComponents ( props ) {
44- const { routes, params} = props ;
44+ const { routes, params, location } = props ;
4545 const { dispatch} = this . props ;
4646
4747 if ( this . routes === params && this . prams === params ) {
@@ -82,9 +82,9 @@ export default (formatPattern) => {
8282
8383 // Merge component props with redux-router props.
8484 props : {
85- ...this . props ,
86- location : props . location ,
87- params : props . params ,
85+ ...relocation . props ,
86+ location,
87+ params,
8888 } ,
8989
9090 // If `route.relocation` is a string, assign it the type. Otherwise
0 commit comments