Use an arrow function inside forEach() instead of an anonymous function

Suggested by deepcode.ai.
This commit is contained in:
Marc Hartmayer 2020-05-24 12:37:54 +02:00
parent 06515559a6
commit b2fee6a6c1
5 changed files with 9 additions and 9 deletions

View file

@ -100,13 +100,13 @@ Checklists.helpers({
},
checkAllItems() {
const checkItems = ChecklistItems.find({ checklistId: this._id });
checkItems.forEach(function(item) {
checkItems.forEach(item => {
item.check();
});
},
uncheckAllItems() {
const checkItems = ChecklistItems.find({ checklistId: this._id });
checkItems.forEach(function(item) {
checkItems.forEach(item => {
item.uncheck();
});
},
@ -307,7 +307,7 @@ if (Meteor.isServer) {
items = [items];
}
}
items.forEach(function(item, idx) {
items.forEach((item, idx) => {
ChecklistItems.insert({
cardId: paramCardId,
checklistId: id,