mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Some self=this adjustments and now basic apps work
This commit is contained in:
committed by
David Glasser
parent
cc2a5d3ffb
commit
6873f4acc1
@@ -935,6 +935,7 @@ _.extend(Meteor._LivedataConnection.prototype, {
|
||||
},
|
||||
|
||||
_pushUpdate: function (updates, collection, msg) {
|
||||
var self = this;
|
||||
if (!_.has(updates, collection)) {
|
||||
updates[collection] = [];
|
||||
}
|
||||
@@ -1050,6 +1051,7 @@ _.extend(Meteor._LivedataConnection.prototype, {
|
||||
},
|
||||
|
||||
_process_complete: function (msg, updates) {
|
||||
var self = this;
|
||||
// Process "sub ready" messages. "sub ready" messages don't take effect
|
||||
// until all current server documents have been flushed to the local
|
||||
// database. We can use a write fence to implement this.
|
||||
|
||||
@@ -704,7 +704,8 @@ _.extend(Meteor._LivedataSubscription.prototype, {
|
||||
},
|
||||
|
||||
onStop: function (callback) {
|
||||
this._stopCallbacks.push(callback);
|
||||
var self = this;
|
||||
self._stopCallbacks.push(callback);
|
||||
},
|
||||
|
||||
added: function (collectionName, id, fields) {
|
||||
@@ -714,10 +715,12 @@ _.extend(Meteor._LivedataSubscription.prototype, {
|
||||
},
|
||||
|
||||
changed: function (collectionName, id, fields) {
|
||||
var self = this;
|
||||
self._session.changed(self._subscriptionId, collectionName, id, fields);
|
||||
},
|
||||
|
||||
removed: function (collectionName, ids) {
|
||||
var self = this;
|
||||
_.each(ids, function(id) {
|
||||
// we don't bother to delete sets of things in a collection if the
|
||||
// collection is empty. It could break below, where we iterate over
|
||||
|
||||
Reference in New Issue
Block a user