Skip to content

Commit 0ef9404

Browse files
authored
Merge pull request #841 from snewcomer/sn/no-deprecation-implicit
Avoid implicit injection _fastbootInfo deprecation
2 parents 4ad4eeb + 2d89348 commit 0ef9404

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/ember-cli-fastboot/addon/services/fastboot.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* global FastBoot */
2+
import { getOwner } from '@ember/application';
23
import { computed, get } from '@ember/object';
34
import { readOnly } from '@ember/object/computed';
45
import { assert } from '@ember/debug';
@@ -88,6 +89,11 @@ const FastBootService = Service.extend({
8889
return RequestObject.create({ request: get(this, '_fastbootInfo.request') });
8990
}),
9091

92+
_fastbootInfo: computed(function() {
93+
// this getter is to avoid deprecation from [RFC - 680](https://github.com/emberjs/rfcs/pull/680)
94+
return getOwner(this).lookup('info:-fastboot');
95+
}),
96+
9197
deferRendering(promise) {
9298
assert('deferRendering requires a promise or thennable object', typeof promise.then === 'function');
9399
this._fastbootInfo.deferRendering(promise);

0 commit comments

Comments
 (0)