From f9018fc3a87080d8d97c371e29a8f3f0a20ca932 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 25 May 2020 21:33:38 +0300 Subject: Sorry marc1006, I had to revert deepcode.ai arrow function fixes because Python API docs generator does not work all when code has arrow functions. Thanks to xet7 ! --- models/checklists.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'models') diff --git a/models/checklists.js b/models/checklists.js index 62c71d5f..831779b7 100644 --- a/models/checklists.js +++ b/models/checklists.js @@ -70,7 +70,7 @@ Checklists.helpers({ this._id = null; this.cardId = newCardId; const newChecklistId = Checklists.insert(this); - ChecklistItems.find({ checklistId: oldChecklistId }).forEach(item => { + ChecklistItems.find({ checklistId: oldChecklistId }).forEach(function(item) { item._id = null; item.checklistId = newChecklistId; item.cardId = newCardId; @@ -100,13 +100,13 @@ Checklists.helpers({ }, checkAllItems() { const checkItems = ChecklistItems.find({ checklistId: this._id }); - checkItems.forEach(item => { + checkItems.forEach(function(item) { item.check(); }); }, uncheckAllItems() { const checkItems = ChecklistItems.find({ checklistId: this._id }); - checkItems.forEach(item => { + checkItems.forEach(function(item) { item.uncheck(); }); }, @@ -307,7 +307,7 @@ if (Meteor.isServer) { items = [items]; } } - items.forEach((item, idx) => { + items.forEach(function(item, idx) { ChecklistItems.insert({ cardId: paramCardId, checklistId: id, -- cgit v1.2.3-1-g7c22