If AJAX call was cancelled, because user navigated to a different page, error callbacks are not invoked.
This commit is contained in:
@@ -10,11 +10,13 @@ var GempLotrCommunication = Class.extend({
|
|||||||
errorCheck:function (errorMap) {
|
errorCheck:function (errorMap) {
|
||||||
var that = this;
|
var that = this;
|
||||||
return function (xhr, status, request) {
|
return function (xhr, status, request) {
|
||||||
var errorStatus = "" + xhr.status;
|
if (xhr.getAllResponseHeaders()) {
|
||||||
if (errorMap != null && errorMap[errorStatus] != null)
|
var errorStatus = "" + xhr.status;
|
||||||
errorMap[errorStatus](xhr, status, request);
|
if (errorMap != null && errorMap[errorStatus] != null)
|
||||||
else
|
errorMap[errorStatus](xhr, status, request);
|
||||||
that.failure(xhr, status, request);
|
else
|
||||||
|
that.failure(xhr, status, request);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user