Fix lint errors

This commit is contained in:
Andrés Manelli 2018-04-18 02:37:20 -03:00
parent 37306c8d22
commit fb75a487fc
3 changed files with 10 additions and 13 deletions

View file

@ -339,7 +339,7 @@ BlazeComponent.extendComponent({
listId: this.selectedListId.get(), listId: this.selectedListId.get(),
archived: false, archived: false,
importedId: null, importedId: null,
_id: {$nin: this.board.cards().map((card) => { return card.importedId || card._id})}, _id: {$nin: this.board.cards().map((card) => { return card.importedId || card._id; })},
}); });
}, },

View file

@ -323,7 +323,7 @@ Boards.helpers({
searchCards(term, excludeImported) { searchCards(term, excludeImported) {
check(term, Match.OneOf(String, null, undefined)); check(term, Match.OneOf(String, null, undefined));
let query = { boardId: this._id }; const query = { boardId: this._id };
if (excludeImported) { if (excludeImported) {
query.importedId = null; query.importedId = null;
} }

View file

@ -426,10 +426,8 @@ Cards.helpers({
setDescription(description) { setDescription(description) {
if (this.isImportedCard()) { if (this.isImportedCard()) {
const card = Cards.findOne({_id: this.importedId});
return Cards.update({_id: this.importedId}, {$set: {description}}); return Cards.update({_id: this.importedId}, {$set: {description}});
} else if (this.isImportedBoard()) { } else if (this.isImportedBoard()) {
const board = Boards.findOne({_id: this.importedId});
return Boards.update({_id: this.importedId}, {$set: {description}}); return Boards.update({_id: this.importedId}, {$set: {description}});
} else { } else {
return Cards.update( return Cards.update(
@ -452,10 +450,9 @@ Cards.helpers({
return board.description; return board.description;
else else
return null; return null;
} else { } else if (this.description) {
if (this.description)
return this.description; return this.description;
else } else {
return null; return null;
} }
}, },
@ -545,7 +542,7 @@ Cards.helpers({
return card.startAt; return card.startAt;
} else if (this.isImportedBoard()) { } else if (this.isImportedBoard()) {
const board = Boards.findOne({_id: this.importedId}); const board = Boards.findOne({_id: this.importedId});
return board.startAt return board.startAt;
} else { } else {
return this.startAt; return this.startAt;
} }
@ -576,7 +573,7 @@ Cards.helpers({
return card.dueAt; return card.dueAt;
} else if (this.isImportedBoard()) { } else if (this.isImportedBoard()) {
const board = Boards.findOne({_id: this.importedId}); const board = Boards.findOne({_id: this.importedId});
return board.dueAt return board.dueAt;
} else { } else {
return this.dueAt; return this.dueAt;
} }