173930cb32, once more, with feeling. I'm not sure why the previous
version has ever worked, given that our own code (a few lines above
this, starting from '// Make the AJAX request') is written in such a
way that `code` can never be `'abort'`.
Bug: 65442
Change-Id: I34bcaa362806bf9e80fb40bc92723f85bea1fb64
// Return the Promise
return apiDeferred.promise( { abort: xhr.abort } ).fail( function ( code, details ) {
- if ( code !== 'abort' ) {
+ if ( !( code === 'http' && details && details.textStatus === 'abort' ) ) {
mw.log( 'mw.Api error: ', code, details );
}
} );