Revert "Fixes #935. ensuring that sync is triggered on the collection after the model is removed."

This reverts commit 0cbcdc96eb.
This commit is contained in:
Jeremy Ashkenas
2012-02-02 14:13:19 -05:00
parent 0cbcdc96eb
commit 799b9b3dd4

View File

@@ -341,13 +341,11 @@
if (this.isNew()) return triggerDestroy();
options.success = function(resp) {
var col = model.collection;
if (options.wait) triggerDestroy();
if (success) {
success(model, resp);
} else {
model.trigger('sync', model, resp, options);
if (col) col.trigger('sync', model, resp, options);
}
};
options.error = Backbone.wrapError(options.error, model, options);