From ff143f94b77125cf5fd2fd743ffc637afa17ed66 Mon Sep 17 00:00:00 2001 From: Emily Stark Date: Fri, 27 Sep 2013 14:58:59 -0700 Subject: [PATCH] Account for undefined options --- packages/mongo-livedata/collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mongo-livedata/collection.js b/packages/mongo-livedata/collection.js index 77ea20637f..75ade797d8 100644 --- a/packages/mongo-livedata/collection.js +++ b/packages/mongo-livedata/collection.js @@ -375,7 +375,7 @@ _.each(["insert", "update", "remove", "upsert"], function (name) { args[0] = Meteor.Collection._rewriteSelector(args[0]); if (name === "update") { - var options = _.clone(args[2]); + var options = _.clone(args[2]) || {}; if (isUpsert) options.upsert = true; if (options && options.upsert) {