mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Don't modify the input variables when creating upsert document
This commit is contained in:
@@ -1156,6 +1156,7 @@ LocalCollection._createUpsertDocument = function (selector, modifier) {
|
||||
return newDoc
|
||||
} else {
|
||||
// Replacement can take _id from query document
|
||||
modifier = EJSON.clone(modifier);
|
||||
if (newDoc._id) {
|
||||
modifier._id = newDoc._id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user