Skip to content
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

[router.ts] Convert this._super to super #19683

Merged
merged 1 commit into from
Jul 30, 2021
Merged

[router.ts] Convert this._super to super #19683

merged 1 commit into from
Jul 30, 2021

Conversation

elwayman02
Copy link
Contributor

The router class has already been converted to a native JS class, so it should be using super.willDestroy in its willDestroy hook instead of this._super.

The router class has already been converted to a native JS class, so it should be using `super.willDestroy` in its `willDestroy` hook instead of `this._super`.
@@ -802,7 +802,7 @@ class EmberRouter extends EmberObject.extend(Evented) implements Evented {
this._toplevelView = null;
}

this._super(...arguments);
super.willDestroy();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per errors from tslint, we need to drop ...arguments here because the underlying base method for willDestroy is already known to accept 0 arguments.

@rwjblue rwjblue merged commit a1760eb into emberjs:master Jul 30, 2021
@elwayman02 elwayman02 deleted the patch-1 branch July 30, 2021 18:18
jgwhite added a commit to hashicorp/waypoint that referenced this pull request Sep 24, 2021
Includes the following bugfixes:

- [#19685](emberjs/ember.js#19685) Fix memory leak with `RouterService` under Chrome
- [#19683](emberjs/ember.js#19683) Ensure `super.willDestroy` is called correctly in `Router`'s `willDestroy`
jgwhite added a commit to hashicorp/waypoint that referenced this pull request Sep 24, 2021
Includes the following bugfixes:

- [#19685](emberjs/ember.js#19685) Fix memory leak with `RouterService` under Chrome
- [#19683](emberjs/ember.js#19683) Ensure `super.willDestroy` is called correctly in `Router`'s `willDestroy`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants