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 !
This commit is contained in:
Lauri Ojansivu 2020-05-25 21:33:38 +03:00
parent 252c4b19f9
commit f9018fc3a8
5 changed files with 12 additions and 12 deletions

View file

@ -365,12 +365,12 @@ BlazeComponent.extendComponent({
}; };
currentBoard currentBoard
.cardsInInterval(start.toDate(), end.toDate()) .cardsInInterval(start.toDate(), end.toDate())
.forEach(card => { .forEach(function(card) {
pushEvent(card); pushEvent(card);
}); });
currentBoard currentBoard
.cardsDueInBetween(start.toDate(), end.toDate()) .cardsDueInBetween(start.toDate(), end.toDate())
.forEach(card => { .forEach(function(card) {
pushEvent( pushEvent(
card, card,
`${card.title} ${TAPi18n.__('card-due')}`, `${card.title} ${TAPi18n.__('card-due')}`,
@ -378,8 +378,8 @@ BlazeComponent.extendComponent({
new Date(card.dueAt.getTime() + 36e5), new Date(card.dueAt.getTime() + 36e5),
); );
}); });
events.sort((first, second) => { events.sort(function(first, second) {
return first.id === second.id ? 0 : first.id > second.id ? 1 : -1; return first.id > second.id ? 1 : -1;
}); });
callback(events); callback(events);
}, },

View file

@ -812,9 +812,9 @@ Template.copyChecklistToManyCardsPopup.events({
// copy subtasks // copy subtasks
cursor = Cards.find({ parentId: oldId }); cursor = Cards.find({ parentId: oldId });
cursor.forEach(cur => { cursor.forEach(function() {
'use strict'; 'use strict';
const subtask = cur; const subtask = arguments[0];
subtask.parentId = _id; subtask.parentId = _id;
subtask._id = null; subtask._id = null;
/* const newSubtaskId = */ Cards.insert(subtask); /* const newSubtaskId = */ Cards.insert(subtask);

View file

@ -653,7 +653,7 @@ BlazeComponent.extendComponent({
'subtext-with-parent', 'subtext-with-parent',
'no-parent', 'no-parent',
]; ];
options.forEach(element => { options.forEach(function(element) {
if (element !== value) { if (element !== value) {
$(`#${element} ${MCB}`).toggleClass(CKCLS, false); $(`#${element} ${MCB}`).toggleClass(CKCLS, false);
$(`#${element}`).toggleClass(CKCLS, false); $(`#${element}`).toggleClass(CKCLS, false);

View file

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

View file

@ -17,7 +17,7 @@ RulesHelper = {
const matchingMap = this.buildMatchingFieldsMap(activity, matchingFields); const matchingMap = this.buildMatchingFieldsMap(activity, matchingFields);
const matchingTriggers = Triggers.find(matchingMap); const matchingTriggers = Triggers.find(matchingMap);
const matchingRules = []; const matchingRules = [];
matchingTriggers.forEach(trigger => { matchingTriggers.forEach(function(trigger) {
const rule = trigger.getRule(); const rule = trigger.getRule();
// Check that for some unknown reason there are some leftover triggers // Check that for some unknown reason there are some leftover triggers
// not connected to any rules // not connected to any rules