Fix some linter errors and warnings
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import Component from '@ember/component';
|
import Component from '@ember/component';
|
||||||
import { computed } from '@ember/object';
|
import { computed } from '@ember/object';
|
||||||
import { alias, and, notEmpty } from '@ember/object/computed';
|
import { and, notEmpty } from '@ember/object/computed';
|
||||||
import { assign } from '@ember/polyfills';
|
import { assign } from '@ember/polyfills';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
// Code from https://github.com/HeroicEric/ember-group-by (MIT licensed)
|
// Code from https://github.com/HeroicEric/ember-group-by (MIT licensed)
|
||||||
//
|
//
|
||||||
import { A } from '@ember/array';
|
import { A } from '@ember/array';
|
||||||
import { get } from '@ember/object';
|
|
||||||
import { isPresent } from '@ember/utils';
|
import { isPresent } from '@ember/utils';
|
||||||
|
|
||||||
export default function groupBy (collection, property) {
|
export default function groupBy (collection, property) {
|
||||||
@@ -11,11 +10,11 @@ export default function groupBy (collection, property) {
|
|||||||
|
|
||||||
if (items) {
|
if (items) {
|
||||||
items.forEach(function(item) {
|
items.forEach(function(item) {
|
||||||
let value = get(item, property);
|
let value = item[property];
|
||||||
let group = groups.findBy('value', value);
|
let group = groups.findBy('value', value);
|
||||||
|
|
||||||
if (isPresent(group)) {
|
if (isPresent(group)) {
|
||||||
get(group, 'items').push(item);
|
group.items.push(item);
|
||||||
} else {
|
} else {
|
||||||
group = { property: property, value: value, items: [item] };
|
group = { property: property, value: value, items: [item] };
|
||||||
groups.push(group);
|
groups.push(group);
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ module('Integration | Component | contribution-list', function(hooks) {
|
|||||||
let kredits = this.owner.lookup('service:kredits');
|
let kredits = this.owner.lookup('service:kredits');
|
||||||
kredits.set('contributors', contributors);
|
kredits.set('contributors', contributors);
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
this.set('fixtures', contributions);
|
this.set('fixtures', contributions);
|
||||||
await render(hbs`{{contribution-list contributions=fixtures showQuickFilter=true}}`);
|
await render(hbs`{{contribution-list contributions=fixtures showQuickFilter=true}}`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user