Fixes issue where load indicator hangs around on errors when a redirect is used

This commit is contained in:
Sam Georges 2014-09-13 17:47:38 +10:00
parent cb3083c17c
commit 69fb8e0918
1 changed files with 6 additions and 2 deletions

View File

@ -103,14 +103,18 @@ if (window.jQuery === undefined)
if (isUnloading)
return
/*
* Disable redirects
*/
isRedirect = false
options.redirect = null
/*
* Error 406 is a "smart error" that returns response object that is
* processed in the same fashion as a successful response.
*/
if (jqXHR.status == 406 && jqXHR.responseJSON) {
errorMsg = jqXHR.responseJSON['X_OCTOBER_ERROR_MESSAGE']
isRedirect = false
options.redirect = null
updatePromise = requestOptions.handleUpdateResponse(jqXHR.responseJSON, textStatus, jqXHR)
}
/*