File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -295,12 +295,14 @@ export class AjaxSubscriber<T> extends Subscriber<Event> {
295
295
if ( this . readyState === 4 ) {
296
296
// normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
297
297
let status : number = this . status === 1223 ? 204 : this . status ;
298
+ let response : any = ( this . responseType === 'text' ? (
299
+ this . response || this . responseText ) : this . response ) ;
298
300
299
301
// fix status code when it is 0 (0 status is undocumented).
300
302
// Occurs when accessing file resources or on Android 4.1 stock browser
301
303
// while retrieving files from application cache.
302
304
if ( status === 0 ) {
303
- status = ( this . response || this . responseText ) ? 200 : 0 ;
305
+ status = response ? 200 : 0 ;
304
306
}
305
307
306
308
if ( 200 <= status && status < 300 ) {
@@ -391,4 +393,4 @@ export class AjaxTimeoutError extends AjaxError {
391
393
constructor ( xhr : XMLHttpRequest , request : AjaxRequest ) {
392
394
super ( 'ajax timeout' , xhr , request ) ;
393
395
}
394
- }
396
+ }
You can’t perform that action at this time.
0 commit comments