Calling router.transitionTo with query params from the controller causes a "Maximum call stack size exceeded" error
controllers/application.js
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
export default class ApplicationController extends Controller {
@service('router') router;
@action
updateQueryParam() {
this.router.transitionTo({
queryParams: {
foo: 'bar'
}
});
}
}
π¬ Minimal Reproduction
Above is the code for minimal reproduction. Ember Twiddle no longer allows me to save my code, but pasting it in there and clicking the button with the console open reveals the stackoverflow issue.
π Actual Behavior
The willTransition hook gets called repeatedly until the stackoverflow occurs.
π Describe the Bug
We have a
willTransition
action handler in the route class:routes/application.js
The template only has a simple button:
application.hbs:
Calling
router.transitionTo
with query params from the controller causes a "Maximum call stack size exceeded" errorcontrollers/application.js
π¬ Minimal Reproduction
Above is the code for minimal reproduction. Ember Twiddle no longer allows me to save my code, but pasting it in there and clicking the button with the console open reveals the stackoverflow issue.
π Actual Behavior
The
willTransition
hook gets called repeatedly until the stackoverflow occurs.π€ Expected Behavior
It should not exceed call stack size.
π Environment