Fix #2269 - clone options before modifying

This commit is contained in:
Casey Foster
2013-02-14 11:39:19 -08:00
parent c530b49370
commit 81f6a16c29

View File

@@ -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]);