more from glasser review

This commit is contained in:
David Greenspan
2013-03-06 19:14:01 -08:00
parent a0f0f64b7f
commit b38ec5513d
2 changed files with 3 additions and 0 deletions

View File

@@ -373,6 +373,7 @@ LocalCollection.Cursor.prototype._depend = function (changers) {
options[fnName] = notifyChange;
});
// observeChanges will stop() when this computation is invalidated
self.observeChanges(options);
}
};

View File

@@ -1774,7 +1774,9 @@ Tinytest.add("minimongo - reactive stop", function (test) {
// observe callbacks don't wait for flush, they are inline.
coll.insert({_id: 'F'});
test.equal(x, "FEDCBA");
test.equal(y, "FEDCBA");
Deps.flush();
coll.insert({_id: 'G'});
test.equal(x, "FEDCBA");
test.equal(y, "FEDCBA");
});