Skip to content

Commit

Permalink
fix: inject page title list to component in dummy
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Jun 6, 2020
1 parent b89ba58 commit 659d76e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/dummy/app/components/page-title-pane/component.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { A } from '@ember/array';
import Component from '@ember/component';
import { computed, set, get } from '@ember/object';
import { inject as service } from '@ember/service';

export default Component.extend({
titleList: service('page-title-list'),

tagName: '',

lastIndex: computed('titleList.tokens.length', {
get() {
return get(this, 'titleList.sortedTokens.length') - 1;
}
},
}),

actions: {
Expand All @@ -22,7 +25,6 @@ export default Component.extend({
set(sortedTokens.findBy('id', token.id), 'active', true);
set(token, 'active', true);
}
}
}

},
},
});

0 comments on commit 659d76e

Please sign in to comment.