From 1f494c5217695b29999d156ceeb7a179a9a08919 Mon Sep 17 00:00:00 2001 From: Scott Newcomer Date: Tue, 2 Feb 2021 15:01:08 -0600 Subject: [PATCH] Sn/bump app scheduler 2 (#277) * Deps: ember-app-scheduler 5.1.2 * setupRouter in constructor --- addon/services/router-scroll.js | 10 +++++++--- package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/addon/services/router-scroll.js b/addon/services/router-scroll.js index 7812038..1dae325 100644 --- a/addon/services/router-scroll.js +++ b/addon/services/router-scroll.js @@ -70,6 +70,13 @@ class RouterScroll extends Service { scrollWhenIdle = false; scrollWhenAfterRender = false; + constructor() { + super(...arguments); + + // https://github.com/ember-app-scheduler/ember-app-scheduler/pull/773 + setupRouter(this.router); + } + init(...args) { super.init(...args); @@ -80,9 +87,6 @@ class RouterScroll extends Service { } }); - // https://github.com/ember-app-scheduler/ember-app-scheduler/pull/773 - setupRouter(this.router); - addListener(this.router, 'routeWillChange', this._routeWillChange); addListener(this.router, 'routeDidChange', this._routeDidChange); } diff --git a/package.json b/package.json index 168bc8d..6dd47ba 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "update": "ember update --run-codemods" }, "dependencies": { - "ember-app-scheduler": "^5.1.1", + "ember-app-scheduler": "^5.1.2", "ember-cli-babel": "^7.11.1", "ember-compatibility-helpers": "^1.1.2" }, diff --git a/yarn.lock b/yarn.lock index e3d3324..b4c3510 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4098,10 +4098,10 @@ electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.621: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.633.tgz#16dd5aec9de03894e8d14a1db4cda8a369b9b7fe" integrity sha512-bsVCsONiVX1abkWdH7KtpuDAhsQ3N3bjPYhROSAXE78roJKet0Y5wznA14JE9pzbwSZmSMAW6KiKYf1RvbTJkA== -ember-app-scheduler@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/ember-app-scheduler/-/ember-app-scheduler-5.1.1.tgz#1dd0bd26d8b82b709b7ec760472059c65951e93d" - integrity sha512-exbZ6wDssBwK+tW4xlQhGzFMng11H0w8jX//E1rjosEXlAtX1X2G0wc1135kX4GJmp5Bp9Pa+HCkH5P2SKAViw== +ember-app-scheduler@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/ember-app-scheduler/-/ember-app-scheduler-5.1.2.tgz#ddf40996579c8587f4264e5604ac3e4be61e33c8" + integrity sha512-nkm+Y9iTTdnO9yATpdg5p2h5PccMajiOJlz+NdgoFr5pgcdfkj7IxQXJw2TLd5iLH2GQiAMmnudrLLN1NIFdvA== dependencies: "@ember/test-waiters" "^2.3.0" "@types/ember" "^3.1.0"