summaryrefslogtreecommitdiffstats
path: root/client/components
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2020-05-24 18:56:36 +0300
committerGitHub <noreply@github.com>2020-05-24 18:56:36 +0300
commit01346152b59255661c6c2e0fba149b4d41a801a1 (patch)
treefe507aa6abdff9101dbf52630e1ee0e3c803b630 /client/components
parent5b7b5b3e7ed4596c57d17f67a9c11d7a460877f6 (diff)
parent6e088af3d13b3b5912b783b485681bbd44ea4427 (diff)
downloadwekan-01346152b59255661c6c2e0fba149b4d41a801a1.tar.gz
wekan-01346152b59255661c6c2e0fba149b4d41a801a1.tar.bz2
wekan-01346152b59255661c6c2e0fba149b4d41a801a1.zip
Merge pull request #3112 from marc1006/deepcode
Some fixes suggested by deepcode.ai
Diffstat (limited to 'client/components')
-rw-r--r--client/components/boards/boardBody.js8
-rw-r--r--client/components/cards/cardDetails.js4
-rw-r--r--client/components/rules/actions/cardActions.js1
-rw-r--r--client/components/sidebar/sidebar.js2
4 files changed, 8 insertions, 7 deletions
diff --git a/client/components/boards/boardBody.js b/client/components/boards/boardBody.js
index 4e473f18..e70faa49 100644
--- a/client/components/boards/boardBody.js
+++ b/client/components/boards/boardBody.js
@@ -365,12 +365,12 @@ BlazeComponent.extendComponent({
};
currentBoard
.cardsInInterval(start.toDate(), end.toDate())
- .forEach(function(card) {
+ .forEach(card => {
pushEvent(card);
});
currentBoard
.cardsDueInBetween(start.toDate(), end.toDate())
- .forEach(function(card) {
+ .forEach(card => {
pushEvent(
card,
`${card.title} ${TAPi18n.__('card-due')}`,
@@ -378,8 +378,8 @@ BlazeComponent.extendComponent({
new Date(card.dueAt.getTime() + 36e5),
);
});
- events.sort(function(first, second) {
- return first.id > second.id ? 1 : -1;
+ events.sort((first, second) => {
+ return first.id === second.id ? 0 : first.id > second.id ? 1 : -1;
});
callback(events);
},
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 11e010d4..d877421c 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -812,9 +812,9 @@ Template.copyChecklistToManyCardsPopup.events({
// copy subtasks
cursor = Cards.find({ parentId: oldId });
- cursor.forEach(function() {
+ cursor.forEach(cur => {
'use strict';
- const subtask = arguments[0];
+ const subtask = cur;
subtask.parentId = _id;
subtask._id = null;
/* const newSubtaskId = */ Cards.insert(subtask);
diff --git a/client/components/rules/actions/cardActions.js b/client/components/rules/actions/cardActions.js
index 7dc6c2b5..2290249c 100644
--- a/client/components/rules/actions/cardActions.js
+++ b/client/components/rules/actions/cardActions.js
@@ -164,6 +164,7 @@ BlazeComponent.extendComponent({
const boardId = Session.get('currentBoard');
const actionId = Actions.insert({
actionType: 'removeMember',
+ // deepcode ignore NoHardcodedCredentials: it's no credential
username: '*',
boardId,
desc,
diff --git a/client/components/sidebar/sidebar.js b/client/components/sidebar/sidebar.js
index 0e535041..7b14c1e0 100644
--- a/client/components/sidebar/sidebar.js
+++ b/client/components/sidebar/sidebar.js
@@ -653,7 +653,7 @@ BlazeComponent.extendComponent({
'subtext-with-parent',
'no-parent',
];
- options.forEach(function(element) {
+ options.forEach(element => {
if (element !== value) {
$(`#${element} ${MCB}`).toggleClass(CKCLS, false);
$(`#${element}`).toggleClass(CKCLS, false);