Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
pgayvallet committed Jun 25, 2020
1 parent cbb9714 commit b1e092b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/public/http/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface Params {
const JSON_CONTENT = /^(application\/(json|x-javascript)|text\/(x-)?javascript|x-json)(;.*)?$/;
const NDJSON_CONTENT = /^(application\/ndjson)(;.*)?$/;

const removedUndefined = (obj: Record<string, any>) => {
const removedUndefined = (obj: Record<string, any> | undefined) => {
return omitBy(obj, (v) => v === undefined);
};

Expand Down Expand Up @@ -147,7 +147,7 @@ export class Fetch {
fetchOptions.headers['kbn-system-request'] = 'true';
}

return new Request(url, fetchOptions);
return new Request(url, fetchOptions as RequestInit);
}

private async fetchResponse(fetchOptions: HttpFetchOptionsWithPath): Promise<HttpResponse<any>> {
Expand Down

0 comments on commit b1e092b

Please sign in to comment.