From 81f6a16c2908917ba33cdc014586cb2793cb3cb8 Mon Sep 17 00:00:00 2001 From: Casey Foster Date: Thu, 14 Feb 2013 11:39:19 -0800 Subject: [PATCH] Fix #2269 - clone options before modifying --- backbone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone.js b/backbone.js index b0e5a297..2ccd6c7f 100644 --- a/backbone.js +++ b/backbone.js @@ -790,7 +790,7 @@ // you can reset the entire set with a new list of models, without firing // any `add` or `remove` events. Fires `reset` when finished. reset: function(models, options) { - options || (options = {}); + options = options ? _.clone(options) : {}; if (options.parse) models = this.parse(models, options); for (var i = 0, l = this.models.length; i < l; i++) { this._removeReference(this.models[i]);