Ox.Request: Only invoke callback or trigger error event for requests that have not been cancelled
This commit is contained in:
parent
f8da7fa1fb
commit
9fbafd2039
1 changed files with 5 additions and 5 deletions
|
@ -160,11 +160,11 @@ Ox.Request = (function() {
|
||||||
$element && $element.triggerEvent('request', {
|
$element && $element.triggerEvent('request', {
|
||||||
requests: Ox.len(requests)
|
requests: Ox.len(requests)
|
||||||
});
|
});
|
||||||
}
|
if (success) {
|
||||||
if (success) {
|
options.callback && options.callback(data);
|
||||||
options.callback && options.callback(data);
|
} else {
|
||||||
} else {
|
$element && $element.triggerEvent('error', data);
|
||||||
$element && $element.triggerEvent('error', data);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue