Commit ee35c96b authored by Clement Ho's avatar Clement Ho

fix eslint

parent 85834b64
......@@ -3,6 +3,7 @@
/* global MilestoneSelect */
/* global LabelsSelect */
/* global Sidebar */
/* global Flash */
import Vue from 'vue';
import eventHub from '../../sidebar/event_hub';
......@@ -85,10 +86,14 @@ require('./sidebar/remove_issue');
saveAssignees () {
this.loadingAssignees = true;
function setLoadingFalse() {
this.loadingAssignees = false;
}
gl.issueBoards.BoardsStore.detail.issue.update(this.endpoint)
.then(() => this.loadingAssignees = false)
.then(setLoadingFalse)
.catch(() => {
this.loadingAssignees = false;
setLoadingFalse();
return new Flash('An error occurred while saving assignees');
});
},
......
......@@ -19,7 +19,7 @@ export default class SidebarMediator {
}
saveAssignees(field) {
const selected = this.store.assignees.map((u) => u.id);
const selected = this.store.assignees.map(u => u.id);
// If there are no ids, that means we have to unassign (which is id = 0)
// And it only accepts an array, hence [0]
......
......@@ -177,7 +177,6 @@ describe('Issue card component', () => {
expect(component.$el.querySelectorAll('.card-assignee .avatar').length).toEqual(4);
});
describe('more than four assignees', () => {
beforeEach((done) => {
component.issue.assignees.push(new ListAssignee({
......@@ -199,7 +198,7 @@ describe('Issue card component', () => {
});
it('renders 99+ avatar counter', (done) => {
for(let i = 5; i < 104; i++) {
for (let i = 5; i < 104; i += 1) {
const u = new ListAssignee({
id: i,
name: 'name',
......@@ -215,7 +214,7 @@ describe('Issue card component', () => {
});
});
});
})
});
describe('labels', () => {
it('does not render any', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment