Skip to content

Commit

Permalink
Update queryParamsTransition to not change QueryParams if transition …
Browse files Browse the repository at this point in the history
…has been aborted
  • Loading branch information
richgt committed Jul 17, 2020
1 parent d8231d3 commit a4bb230
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ export default abstract class Router<T extends Route> {

newTransition.promise = newTransition.promise!.then(
(result: TransitionState<T> | Route | Error | undefined) => {
this._updateURL(newTransition, oldState);
this.didTransition(this.currentRouteInfos!);
this.toInfos(newTransition, newState.routeInfos, true);
this.routeDidChange(newTransition);
if (!newTransition.isAborted) {
this._updateURL(newTransition, oldState);
this.didTransition(this.currentRouteInfos!);
this.toInfos(newTransition, newState.routeInfos, true);
this.routeDidChange(newTransition);
}
return result;
},
null,
Expand Down

0 comments on commit a4bb230

Please sign in to comment.