Skip to content

Commit

Permalink
Run service teardown code in willDestroy() (#257)
Browse files Browse the repository at this point in the history
* Run service teardown code in willDestroy()

* Revert super.willDestroy
  • Loading branch information
SergeAstapov authored Aug 1, 2020
1 parent df23a15 commit d6cc035
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class EmberRouterScroll extends EmberRouter {
});
}

destroy() {
willDestroy() {
reset();

if (requestId) {
Expand All @@ -125,7 +125,7 @@ class EmberRouterScroll extends EmberRouter {
window.cancelAnimationFrame(callbackRequestId);
}

super.destroy(...arguments);
super.willDestroy(...arguments);
}

/**
Expand Down

0 comments on commit d6cc035

Please sign in to comment.