mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Fix #2269 - clone options before modifying
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user