diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-24 00:13:35 +0100 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2019-02-24 00:13:35 +0100 |
commit | eb62c9ce6ad0fa0d5de7889ec087db8cdc579339 (patch) | |
tree | 23fb755a2c54fd4cd153af9ab3e7d391449547e7 /models/lists.js | |
parent | 60be4df76e02afdf4dd62f8e03505d55c0ed119e (diff) | |
download | wekan-eb62c9ce6ad0fa0d5de7889ec087db8cdc579339.tar.gz wekan-eb62c9ce6ad0fa0d5de7889ec087db8cdc579339.tar.bz2 wekan-eb62c9ce6ad0fa0d5de7889ec087db8cdc579339.zip |
Fix lint errors
Diffstat (limited to 'models/lists.js')
-rw-r--r-- | models/lists.js | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/models/lists.js b/models/lists.js index 76708ffd..453e0be1 100644 --- a/models/lists.js +++ b/models/lists.js @@ -138,30 +138,30 @@ Lists.allow({ Lists.helpers({ copy() { - const oldId = this._id; - let _id = null; - existingListWithSameName = Lists.findOne({ - boardId: this.boardId, - title: this.title, - }); - if (existingListWithSameName) { - _id = existingListWithSameName._id; - } else { - this._id = null; - _id = Lists.insert(this); - } + const oldId = this._id; + let _id = null; + existingListWithSameName = Lists.findOne({ + boardId: this.boardId, + title: this.title, + }); + if (existingListWithSameName) { + _id = existingListWithSameName._id; + } else { + this._id = null; + _id = Lists.insert(this); + } - // Copy all cards in list - Cards.find({ - listId: oldId, - archived: false, - }).forEach((card) => { - card.type = 'cardType-card'; - card.listId = _id; - card.boardId = this.boardId; - card.swimlaneId = this.swimlaneId; - card.copy(); - }); + // Copy all cards in list + Cards.find({ + listId: oldId, + archived: false, + }).forEach((card) => { + card.type = 'cardType-card'; + card.listId = _id; + card.boardId = this.boardId; + card.swimlaneId = this.swimlaneId; + card.copy(); + }); }, cards(swimlaneId) { @@ -224,7 +224,7 @@ Lists.mutations({ archive() { if (this.isTemplateList()) { this.cards().forEach((card) => { - return card.archive(); + return card.archive(); }); } return { $set: { archived: true } }; @@ -233,7 +233,7 @@ Lists.mutations({ restore() { if (this.isTemplateList()) { this.allCards().forEach((card) => { - return card.restore(); + return card.restore(); }); } return { $set: { archived: false } }; |