mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Make sure our mutated options object makes into the actual collection method
This commit is contained in:
@@ -375,7 +375,8 @@ _.each(["insert", "update", "remove", "upsert"], function (name) {
|
||||
args[0] = Meteor.Collection._rewriteSelector(args[0]);
|
||||
|
||||
if (name === "update") {
|
||||
var options = _.clone(args[2]) || {};
|
||||
// Mutate args but copy the original options object.
|
||||
var options = args[2] = _.clone(args[2]) || {};
|
||||
if (isUpsert)
|
||||
options.upsert = true;
|
||||
if (options && options.upsert) {
|
||||
|
||||
Reference in New Issue
Block a user