mirror of
https://github.com/wekan/wekan.git
synced 2026-02-27 02:14:06 +01:00
Merge pull request #3112 from marc1006/deepcode
Some fixes suggested by deepcode.ai
This commit is contained in:
commit
01346152b5
9 changed files with 16 additions and 15 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ if (Meteor.isServer) {
|
|||
throw new Meteor.Error('invalid-user');
|
||||
}
|
||||
const user = Meteor.user();
|
||||
if (!user.emails && !user.emails[0] && user.emails[0].address) {
|
||||
if (!user.emails || !user.emails[0] || user.emails[0].address) {
|
||||
throw new Meteor.Error('email-invalid');
|
||||
}
|
||||
this.unblock();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue