Author: damoxc
Revision: 5121
Log:
fix calling the success/failure callbacks
Diff:
Modified: trunk/deluge/ui/web/js/Deluge.Client.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Client.js 2009-04-21 20:27:25 UTC (rev
5120)
+++ trunk/deluge/ui/web/js/Deluge.Client.js 2009-04-21 20:34:41 UTC (rev
5121)
@@ -91,14 +91,14 @@
var responseObj = Ext.decode(response.responseText);
var options = requestOptions.options;
if (responseObj.error) {
- if (!options.failure) return;
+ if (Ext.type(options.failure) != 'function') return;
if (options.scope) {
options.failure.call(options.scope, responseObj.error,
responseObj, response);
} else {
options.failure(responseObj.error, responseObj, response);
}
} else {
- if (!options.success) return;
+ if (Ext.type(options.success) != 'function') return;
if (options.scope) {
options.success.call(options.scope, responseObj.result,
responseObj, response);
} else {
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---