-
-
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
Engine routes deactivated after destruction #14234
Comments
@trentmwillis - Can you work up a failing test (best harness ATM for this is here)? |
@rwjblue / @asakusuma do you know if the original issue:
Had tests to catch a regression? Because I looked into fixing this and just switching the order back seems to pass without failing any tests. |
@trentmwillis - Yeah, I think the |
@rwjblue okay, so do you think switching the order back seems like the proper solution? If so, I'll update my PR with the failing test. |
@trentmwillis - Yeah, lets switch it back and confirm tests pass. |
Fixed via #14237. Tested against the latest release build. |
In 2.8.0, there was a change introduced to the order of teardown when Engines are involved. The change in question seems to have fixed another issue, but causes routes in Engines to be destroyed prior to their
deactivate
hook being run (during the Router'sreset
).This means that if you do something such as
set
a property on the Route duringdeactivate
, then errors will propagate in Acceptance tests.Unsure what the proper fix is here. Seems like maybe only the views from the Engines should be torn down prior to resetting the Router.
(Here's the prior implementation from the ember-engines addon.)
cc @asakusuma @krisselden
The text was updated successfully, but these errors were encountered: