[Pkg-javascript-commits] [backbone] 25/37: Fixes #935. ensuring that sync is triggered on the collection after the model is removed.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:02:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.9.1
in repository backbone.
commit 0cbcdc96eb05457e7635aa5d91c8f3f89e0335b3
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Thu Feb 2 14:09:54 2012 -0500
Fixes #935. ensuring that sync is triggered on the collection after the model is removed.
---
backbone.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backbone.js b/backbone.js
index ceb22e5..4743d08 100644
--- a/backbone.js
+++ b/backbone.js
@@ -341,11 +341,13 @@
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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list