[Pkg-javascript-commits] [backbone] 67/281: Trigger error on originalModel not model
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:01:57 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.9.0
in repository backbone.
commit da51087dbf7b8a27b39776e695bc285bc87ba127
Author: Tristan McCann <tristan.mccann at infogroup.com>
Date: Fri Nov 4 16:02:03 2011 -0400
Trigger error on originalModel not model
The original model that the 'sync' request was called in should be the
object that is taking the 'error' trigger.
After a 'fetch' request on a collection, 'model' is the jQuery xhr
object, which does not have a 'trigger' method.
---
backbone.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backbone.js b/backbone.js
index 2b91517..cd994a9 100644
--- a/backbone.js
+++ b/backbone.js
@@ -1155,7 +1155,7 @@
if (onError) {
onError(model, resp, options);
} else {
- model.trigger('error', model, resp, options);
+ originalModel.trigger('error', model, resp, 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