mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Assure that transform is not changing cached object.
This commit is contained in:
@@ -157,6 +157,7 @@ LocalCollection._observeFromObserveChanges = function (cursor, observeCallbacks)
|
||||
var self = this;
|
||||
if (observeCallbacks.changed) {
|
||||
var oldDoc = self.docs.get(id);
|
||||
oldDoc = EJSON.clone(oldDoc);
|
||||
var doc = EJSON.clone(oldDoc);
|
||||
LocalCollection._applyChanges(doc, fields);
|
||||
observeCallbacks.changed(transform(doc), transform(oldDoc));
|
||||
|
||||
Reference in New Issue
Block a user