-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
throw when a transition starts while another is still in progress #204
Comments
Why not do the Ember thing and treat this situation as an implicit abort of the first transition attempt? |
I agree with @machty. If a transition hook returns a slow promise (which we wait for) the user could have clicked another link. I think we should allow that, and just abort the current transition. |
👍 Yeah, that totally makes sense. |
@mjackson is this a part of your big refactor? |
I think we can include this in the work I'm doing now. |
This was fixed by #480 |
Using the high-level
transitionTo
,replaceWith
andgoBack
methods are a footgun when used insidewillTransitionTo
, so we should warn users if they try and kick off a transition while another is still in progress. The easiest way to do this is probably insideRoutes#dispatch
. Just have some flag that indicates whether or not a transition is currently in progress, andthrow
if a new one comes in.See #198 (comment)
The text was updated successfully, but these errors were encountered: