-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta] Avoid rerendering outlet state during router destruction.
During each `Ember.Route`'s `willDestroy` we trigger a `run.once(this.router, '_setOutlets');`. This is so that the routes views are destroyed properly (by removing them from the outlet state). During `Ember.Router`'s `willDestroy` we clear `this._toplevelView` (along with a bunch of other cleanup). These two things combined can mean that `this._toplevelView` is `null` when `_setOutlets` is called again (during the `Router`'s destruction). In that scenario we are actually creating another `this._toplevelView` and setting up another rendered root (since one doesn't exist). When this happens the newly created root is never cleaned up, since the Router's `willDestroy` has already ran and can no longer clean up after itself.
- Loading branch information
Robert Jackson
committed
Aug 24, 2016
1 parent
5f5b9ae
commit 890fb04
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters