From 460ce03c0f1f7fb389f74fa9c0d2c123829ce7c5 Mon Sep 17 00:00:00 2001 From: Yaman Qalieh Date: Tue, 16 Aug 2016 17:53:27 -0400 Subject: [PATCH] object setting bug --- hourglass/server/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hourglass/server/main.js b/hourglass/server/main.js index efb005a..427b299 100644 --- a/hourglass/server/main.js +++ b/hourglass/server/main.js @@ -185,7 +185,8 @@ Meteor.methods({ var foundclass = Meteor.findOne({_id: input[1]}); var userlist = input[2]; var index = possiblelist.indexOf(input[2]); - var set = {userlist: foundclass[userlist].splice(foundclass[userlist].indexOf(input[0]))}; + var set = {}; + set[userlist] = foundclass[userlist].splice(foundclass[userlist].indexOf(input[0])); if (Roles.userIsInRole(Meteor.userId(), ['superadmin', 'admin'])) { classes.update({_id: input[1]}, {$set: set}); } else if (foundclass && foundclass.admin == Meteor.userId() && index !== -1 &&