summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorMarc Hartmayer <hello@hartmayer.com>2020-05-24 12:37:54 +0200
committerMarc Hartmayer <hello@hartmayer.com>2020-05-24 12:44:14 +0200
commitb2fee6a6c196f2ed2788444ad2387fba8f6df9cb (patch)
treed4b90757af23c3afa7e41b15f0bf2f60673d9178 /models
parent06515559a62a9caea7e31326c381dac0d40f710b (diff)
downloadwekan-b2fee6a6c196f2ed2788444ad2387fba8f6df9cb.tar.gz
wekan-b2fee6a6c196f2ed2788444ad2387fba8f6df9cb.tar.bz2
wekan-b2fee6a6c196f2ed2788444ad2387fba8f6df9cb.zip
Use an arrow function inside forEach() instead of an anonymous function
Suggested by deepcode.ai.
Diffstat (limited to 'models')
-rw-r--r--models/checklists.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/checklists.js b/models/checklists.js
index cf73e500..62c71d5f 100644
--- a/models/checklists.js
+++ b/models/checklists.js
@@ -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,