mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-23 05:48:10 -05:00
only increment length once
This commit is contained in:
@@ -429,8 +429,8 @@
|
||||
this._byCid[model.cid] = model;
|
||||
if (hasId) this._byId[model.id] = model;
|
||||
model.bind('all', this._onModelEvent, this);
|
||||
this.length++;
|
||||
}
|
||||
this.length += l;
|
||||
i = options.at != null ? options.at : this.models.length;
|
||||
splice.apply(this.models, [i, 0].concat(models));
|
||||
if (this.comparator) this.sort({silent: true});
|
||||
|
||||
Reference in New Issue
Block a user