Skip to content

Fix linting error (#775) #781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions app/components/search-input/dropdown.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
/* eslint-disable ember/no-computed-properties-in-native-classes, ember/classic-decorator-hooks */
import {
classNames,
attributeBindings,
tagName,
} from '@ember-decorators/component';
import { set, get, computed } from '@ember/object';
import { get } from '@ember/object';
import Component from '@ember/component';
import { A } from '@ember/array';

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

isVisible = false;

init() {
super.init(...arguments);
set(this, 'results', A());
}

// show
// Massage data to make it easier for displaying on the template
// Returned object:
Expand All @@ -32,13 +26,14 @@ export default class Dropdown extends Component {
* }
* }
*/
@computed('results.[]')

get _groupedResults() {
if (!get(this, 'results.length')) {
let results = get(this, 'results');
if (!results.length) {
return {};
}

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