Merge branch 'master' of github.com:documentcloud/backbone

This commit is contained in:
Jeremy Ashkenas
2012-01-11 11:56:22 -05:00

View File

@@ -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;
},