Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(BUILD): fix broken build (#3285) #3369

Merged
merged 1 commit into from
Mar 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/observable/dom/AjaxObservable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,13 +462,17 @@ function parseXhrResponse(responseType: string, xhr: XMLHttpRequest) {
//IE does not support json as responseType, parse it internally
return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');
} else {
return JSON.parse(xhr.responseText || 'null');
// HACK(benlesh): TypeScript shennanigans
// tslint:disable-next-line:no-any latest TS seems to think xhr is "never" here.
return JSON.parse((xhr as any).responseText || 'null');
}
case 'xml':
return xhr.responseXML;
case 'text':
default:
return ('response' in xhr) ? xhr.response : xhr.responseText;
// HACK(benlesh): TypeScript shennanigans
// tslint:disable-next-line:no-any latest TS seems to think xhr is "never" here.
return ('response' in xhr) ? xhr.response : (xhr as any).responseText;
}
}

Expand Down