We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8162654 commit bba13d8Copy full SHA for bba13d8
src/observable/dom/AjaxObservable.ts
@@ -375,11 +375,13 @@ export class AjaxResponse {
375
376
constructor(public originalEvent: Event, public xhr: XMLHttpRequest, public request: AjaxRequest) {
377
this.status = xhr.status;
378
- this.responseType = xhr.responseType;
+ this.responseType = xhr.responseType || request.responseType;
379
+
380
switch (this.responseType) {
381
case 'json':
382
if ('response' in xhr) {
- this.response = xhr.response;
383
+ //IE does not support json as responseType, parse it internally
384
+ this.response = xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || '');
385
} else {
386
this.response = JSON.parse(xhr.responseText || '');
387
}
0 commit comments