Skip to content

Commit

Permalink
[BUGFIX beta] provide transition to setupContext for internal transit…
Browse files Browse the repository at this point in the history
…ions

Prior e792f2c we were calling `this.setupContext(newState, transition)` for intermediate transitions, which got replaced with `this.setupContexts(newState)`. This results in buggy behavior when query params get lost in certain scenarios.

Refs: emberjs/ember.js#14438
  • Loading branch information
rreckonerr committed Nov 5, 2020
1 parent 7ecad99 commit 0be0d19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ export default abstract class Router<T extends Route> {
}

if (isIntermediate) {
let transition = new InternalTransition(this, undefined, undefined);
let transition = new InternalTransition(this, undefined, newState);
this.toReadOnlyInfos(transition, newState);
this.setupContexts(newState);
this.setupContexts(newState, transition);

this.routeWillChange(transition);
return this.activeTransition!;
Expand Down

0 comments on commit 0be0d19

Please sign in to comment.