diff options
Diffstat (limited to 'models/checklists.js')
-rw-r--r-- | models/checklists.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/models/checklists.js b/models/checklists.js index 99e9f25e..9e763f1a 100644 --- a/models/checklists.js +++ b/models/checklists.js @@ -49,16 +49,16 @@ Checklists.attachSchema(new SimpleSchema({ Checklists.helpers({ copy(newCardId) { - const oldChecklistId = this._id; - this._id = null; - this.cardId = newCardId; - const newChecklistId = Checklists.insert(this); - ChecklistItems.find({checklistId: oldChecklistId}).forEach((item) => { - item._id = null; - item.checklistId = newChecklistId; - item.cardId = newCardId; - ChecklistItems.insert(item); - }); + const oldChecklistId = this._id; + this._id = null; + this.cardId = newCardId; + const newChecklistId = Checklists.insert(this); + ChecklistItems.find({checklistId: oldChecklistId}).forEach((item) => { + item._id = null; + item.checklistId = newChecklistId; + item.cardId = newCardId; + ChecklistItems.insert(item); + }); }, itemCount() { |