Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/router/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ export default abstract class Router<T extends Route> {
// perform a URL update at the end. This gives
// the user the ability to set the url update
// method (default is replaceState).
let newTransition = new InternalTransition(this, undefined, undefined);
let newTransition = new InternalTransition(this, undefined, newState);
newTransition.queryParamsOnly = true;
Copy link
Author

@buschtoens buschtoens Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
newTransition.queryParamsOnly = true;
newTransition.queryParamsOnly = true;
this.setupContexts(newState, newTransition);

Some other tests started breaking with the undefined -> newState change in L123, because this apparently leaks through Routes which haven't yet been passed through setupContexts(...) and thus did not have their setup(...) hook called.

Ultimately this causes Route#finalizeQueryParamChange to fail, as it expects route.controller to be defined.

this.setupContexts(newState, newTransition);

oldState.queryParams = this.finalizeQueryParamChange(
newState.routeInfos,
Expand Down