Skip to content

Commit 12eaca5

Browse files
committed
some fixes
1 parent 1d1b6c6 commit 12eaca5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/browser-router.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default class BrowserRouter extends Router {
6464
ctx
6565
}
6666
};
67-
const renderCallback = Router.makeCallback(this.router, { path, route, status, params, redirect, result, ctx });
67+
const renderCallback = Router.makeCallback(this.router, { path, location, route, status, params, redirect, result, ctx });
6868
this.changeComponent({ Component: result, componentProps: props, path, location, renderCallback });
6969
} catch (error) {
7070
if (this.props.errorHandler) {

src/router.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default class Router extends React.Component<Props, State> {
9393
history
9494
},
9595
componentProps,
96-
callback: this.makeCallback(router, { path, route, status, params, redirect, result, ctx })
96+
callback: this.makeCallback(router, { path, location, route, status, params, redirect, result, ctx })
9797
}
9898
}
9999
static buildRoutes(routes) {
@@ -133,7 +133,7 @@ export default class Router extends React.Component<Props, State> {
133133
}
134134
replaceComponent(Component, componentProps) {
135135
if (this.subscriber) {
136-
this.subscriber({ Component, componentProps, path: this.path, location: this.location })
136+
this.subscriber({ Component, componentProps, path: this.state.path, location: this.state.location })
137137
} else {
138138
this.setState({
139139
Component,

0 commit comments

Comments
 (0)