mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-24 22:37:58 -05:00
internal Collection#_add and Collection#_remove, should return the model, in case they're overridden.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user