Skip to content

Commit

Permalink
Ensure service is fastboot compatible. Specifically with using `scrol…
Browse files Browse the repository at this point in the history
…lElement`
  • Loading branch information
snewcomer committed Mar 5, 2018
1 parent 09d02ae commit 3387855
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions addon/services/router-scroll.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
/* eslint-disable */
import Ember from 'ember';
import Service from '@ember/service';
import { getWithDefault, computed, set, get } from '@ember/object';

const { getOwner, typeOf } = Ember;
import { typeOf } from '@ember/utils';
import { getOwner } from '@ember/application';

export default Service.extend({
isFastBoot: computed(function() {
const fastboot = getOwner(this).lookup('service:fastboot');
return fastboot ? fastboot.get('isFastBoot') : false;
}),

scrollElement: 'window',

init(...args) {
Expand Down

0 comments on commit 3387855

Please sign in to comment.