mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
fix calling the success/failure callbacks
This commit is contained in:
parent
1f212b8a38
commit
b62a5d7329
1 changed files with 2 additions and 2 deletions
|
@ -91,14 +91,14 @@ Ext.namespace('Ext.ux.util');
|
|||
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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue