From d6cc035e45a3e85c0ea97ffe98d4276f3e558437 Mon Sep 17 00:00:00 2001 From: Sergey Astapov Date: Sat, 1 Aug 2020 17:19:54 -0400 Subject: [PATCH] Run service teardown code in willDestroy() (#257) * Run service teardown code in willDestroy() * Revert super.willDestroy --- addon/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/index.js b/addon/index.js index 11c308a6..231bbdb7 100644 --- a/addon/index.js +++ b/addon/index.js @@ -114,7 +114,7 @@ class EmberRouterScroll extends EmberRouter { }); } - destroy() { + willDestroy() { reset(); if (requestId) { @@ -125,7 +125,7 @@ class EmberRouterScroll extends EmberRouter { window.cancelAnimationFrame(callbackRequestId); } - super.destroy(...arguments); + super.willDestroy(...arguments); } /**