-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite recursion with willTransition hook and queryParams #9818
Comments
Marking issue a inactive as per our triage policy. |
Issue still present on 3.1.1: https://github.com/btecu/ember-issues/tree/9818 |
Same as #12473 Update: For my case, i ended up adding |
This is a Bug there are workarounds like @karthiicksiva mentions. Or even better, if you really need to transition to the same state/route but with different params maybe ask the question "why am I using the same state of the app for a different state?" Likely using a different route would be even better. |
@karthiicksiva I just noticed that @rwjblue what do you think about making |
This issue is even more pronounced than I thought.
It even shows up for different routes that have same query parameter values. Even after transition is aborted, the query param value from targetRoute is updated to current route which causes an infinite loop of queryParamDidChange calls until stack size exceeds. I'm seeing this error on version 3.28. Twiddle reproduction: https://ember-twiddle.com/6cd2aa8a2605fa851397a83953e4ecb2?numColumns=2&openFiles=routes.my-route%5C.js%2Croutes.my-route-one%5C.js Related issue: tildeio/router.js#323 |
This reverts commit 813c9be. I was very mistaken. The issue wasn't with my code but with versions of Ember: emberjs/ember.js#9818
I have a route with a query parameter with
refreshModel
set to true. The route has awillTransition
hook, which prompts the user to confirm that they want to navigate away from the route. If the user presses cancel, the transition is aborted usingtransition.abort()
. This combination causes the router to enter infinite recursion where the user is presented with the confirm dialog over and over again until they press ok.JSbin: http://jsbin.com/vuzaxe/1
Steps to reproduce: click one of the colors, press the cancel button on the confirmation dialog
The text was updated successfully, but these errors were encountered: