mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-23 13:58:06 -05:00
Merge branch 'master' of github.com:documentcloud/backbone
This commit is contained in:
@@ -390,7 +390,7 @@
|
||||
Backbone.Collection = function(models, options) {
|
||||
options || (options = {});
|
||||
if (options.comparator) this.comparator = options.comparator;
|
||||
_.bindAll(this, '_onModelEvent', '_removeReference');
|
||||
_.bindAll(this, '_removeReference');
|
||||
this._reset();
|
||||
if (models) this.reset(models, {silent: true});
|
||||
this.initialize.apply(this, arguments);
|
||||
@@ -573,7 +573,7 @@
|
||||
} else {
|
||||
this.models.push(model);
|
||||
}
|
||||
model.bind('all', this._onModelEvent);
|
||||
model.bind('all', this._onModelEvent, this);
|
||||
this.length++;
|
||||
return model;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user