internal Collection#_add and Collection#_remove, should return the model, in case they're overridden.

This commit is contained in:
Jeremy Ashkenas
2010-10-14 13:04:11 -04:00
parent a797829c8d
commit 82365e392e

View File

@@ -441,6 +441,7 @@
model.bind('all', this._boundOnModelEvent);
this.length++;
if (!options.silent) this.trigger('add', model);
return model;
},
// Internal implementation of removing a single model from the set, updating
@@ -456,6 +457,7 @@
model.unbind('all', this._boundOnModelEvent);
this.length--;
if (!options.silent) this.trigger('remove', model);
return model;
},
// Internal method called every time a model in the set fires an event.