Skip to content

Commit

Permalink
Hopefully fix slow tests. Shallow copy on types we swizzle in&out of …
Browse files Browse the repository at this point in the history
…mongo
  • Loading branch information
Naomi Seyfer committed Feb 21, 2013
1 parent 00cc07c commit 7b1bf06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mongo-livedata/mongo_driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ var replaceTypes = function (document, atomTransformer) {
_.each(document, function (val, key) {
var valReplaced = replaceTypes(val, atomTransformer);
if (val !== valReplaced) {
// Lazy clone.
// Lazy clone. Shallow copy.
if (ret === document)
ret = EJSON.clone(document);
ret = _.clone(document);
ret[key] = valReplaced;
}
});
Expand Down

0 comments on commit 7b1bf06

Please sign in to comment.