summaryrefslogtreecommitdiffstats
path: root/models/cards.js
diff options
context:
space:
mode:
authorzago <arnaud.zago@gmail.com>2017-06-29 15:45:27 +0200
committerzago <arnaud.zago@gmail.com>2017-06-29 15:45:27 +0200
commitafc30226ac3bb0430a80a8607f5abf4a88551b8a (patch)
tree8b2163fa9ee6834cb9d2184a8b810cbe8b039354 /models/cards.js
parent95f1772280d453c3ad55486806f17cb6b445359d (diff)
downloadwekan-afc30226ac3bb0430a80a8607f5abf4a88551b8a.tar.gz
wekan-afc30226ac3bb0430a80a8607f5abf4a88551b8a.tar.bz2
wekan-afc30226ac3bb0430a80a8607f5abf4a88551b8a.zip
fixe error
Diffstat (limited to 'models/cards.js')
-rw-r--r--models/cards.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js
index a48690bf..415c3bde 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -425,17 +425,17 @@ if (Meteor.isServer) {
const paramBoardId = req.params.boardId;
const paramCardId = req.params.cardId;
const paramListId = req.params.listId;
- if(req.body.title !== undefined){
+ if(req.body.hasOwnProperty('title')){
const newTitle = req.body.title;
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
{$set:{title:newTitle}});
}
- if(req.body.listId !== undefined){
+ if(req.body.hasOwnProperty('listId')){
const newParamListId = req.body.listId;
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
{$set:{listId:newParamListId}});
}
- if(req.body.description !== undefined){
+ if(req.body.hasOwnProperty('description')){
const newDescription = req.body.description;
Cards.update({ _id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false },
{$set:{description:newDescription}});