Skip to content

Commit 2dfed6f

Browse files
authored
Merge pull request #781 from rajakvk/rk-775-fix-linting-error-5
Fix linting error (#775)
2 parents 9d5f38d + 37ade58 commit 2dfed6f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

app/components/search-input/dropdown.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/* eslint-disable ember/no-computed-properties-in-native-classes, ember/classic-decorator-hooks */
21
import {
32
classNames,
43
attributeBindings,
54
tagName,
65
} from '@ember-decorators/component';
7-
import { set, get, computed } from '@ember/object';
6+
import { get } from '@ember/object';
87
import Component from '@ember/component';
98
import { A } from '@ember/array';
109

@@ -17,11 +16,6 @@ export default class Dropdown extends Component {
1716

1817
isVisible = false;
1918

20-
init() {
21-
super.init(...arguments);
22-
set(this, 'results', A());
23-
}
24-
2519
// show
2620
// Massage data to make it easier for displaying on the template
2721
// Returned object:
@@ -32,13 +26,14 @@ export default class Dropdown extends Component {
3226
* }
3327
* }
3428
*/
35-
@computed('results.[]')
29+
3630
get _groupedResults() {
37-
if (!get(this, 'results.length')) {
31+
let results = get(this, 'results');
32+
if (!results.length) {
3833
return {};
3934
}
4035

41-
const lvl0Group = this.results.reduce((previous, current) => {
36+
const lvl0Group = results.reduce((previous, current) => {
4237
// Remap all lowercase usages of 'guides' to 'Guides'
4338
let lvl0 = get(current, 'hierarchy.lvl0');
4439
// If lvl0 doesn't exist in the resulting object, create the array

0 commit comments

Comments
 (0)