From 941db4cdde9484e2f2fbc18f3a22b2fc17def31e Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Sat, 11 Apr 2015 18:42:17 +0200 Subject: [PATCH] correct bug : collection.update should use set:{} (this was failing without autopublish and insecure) --- codebase/meteor-data.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/codebase/meteor-data.js b/codebase/meteor-data.js index b2a52fe..e46414d 100644 --- a/codebase/meteor-data.js +++ b/codebase/meteor-data.js @@ -18,7 +18,7 @@ webix.proxy.meteor = { } else { //[WARNING] there is no public method to convert collection name to the object this.cursor = Meteor.connection._mongo_livedata_collections[this.source]; - this.collection = this.cursor.collection; + this.collection = this.cursor.collection; } }, /* @@ -99,7 +99,7 @@ webix.proxy.meteor = { delete obj.data.id; if (obj.operation == "update"){ //data changed - this.collection.update(obj.id, obj.data); + this.collection.update(obj.id, { $set: obj.data } ); webix.delay(function(){ callback.success("", { }, -1); }); @@ -143,4 +143,4 @@ webix.attachEvent("onSyncUnknown", function(target, source){ target.sync(data); } -}); \ No newline at end of file +});