mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
update returns this, save an extra line by returning update directly
This commit is contained in:
@@ -597,8 +597,7 @@
|
||||
// Add a model, or list of models to the set.
|
||||
add: function(models, options) {
|
||||
options = _.extend({add: true, merge: false, remove: false}, options);
|
||||
this.update(models, options);
|
||||
return this;
|
||||
return this.update(models, options);
|
||||
},
|
||||
|
||||
// Remove a model, or a list of models from the set.
|
||||
|
||||
Reference in New Issue
Block a user