diff --git a/tests/dummy/app/components/page-title-pane/component.js b/tests/dummy/app/components/page-title-pane/component.js index 1a40e1b4..964d9489 100644 --- a/tests/dummy/app/components/page-title-pane/component.js +++ b/tests/dummy/app/components/page-title-pane/component.js @@ -8,23 +8,18 @@ export default Component.extend({ titleList: service(), - lastIndex: computed('titleList.{sortedTokens.length,tokens.length}', { + lastIndex: computed('titleList.{tokens.length}', { get() { - return this.titleList.sortedTokens.length - 1; + return this.titleList.tokens.length - 1; }, }), actions: { highlight(token) { - let sortedTokens = A(this.titleList.sortedTokens); + let tokens = A(this.titleList.tokens); let wasActive = token.active; - this.titleList.tokens.setEach('active', false); - sortedTokens.setEach('active', false); - - if (!wasActive) { - set(sortedTokens.findBy('id', token.id), 'active', true); - set(token, 'active', true); - } + tokens.setEach('active', false); + set(token, 'active', !wasActive); }, }, }); diff --git a/tests/dummy/app/components/page-title-pane/nested-template/component.js b/tests/dummy/app/components/page-title-pane/nested-template/component.js index 8bff1506..cb93fbb9 100644 --- a/tests/dummy/app/components/page-title-pane/nested-template/component.js +++ b/tests/dummy/app/components/page-title-pane/nested-template/component.js @@ -7,10 +7,10 @@ export default Component.extend({ classNames: ['nested-template'], classNameBindings: ['active:active'], - active: computed('titleList.{sortedTokens,tokens.@each.active}', 'token.id', { + active: computed('titleList.{tokens.@each.active}', 'token.id', { get() { - let sortedTokens = A(this.titleList.sortedTokens); - let token = sortedTokens.findBy('id', this.token.id); + let tokens = A(this.titleList.tokens); + let token = tokens.findBy('id', this.token.id); return token && token.active; }, }),