Skip to content

Commit

Permalink
fix(fetch): build issue #73
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Mar 10, 2022
1 parent d32c777 commit fb74463
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions package/fetch/src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ export function fetch(url: string, options?: FetchOptions): Promise<Response> {

if (options.bodyObject != null) {
options.body = JSON.stringify(options.bodyObject);
options.headers ??= {};
options.headers['Content-Type'] = 'application/json';
options.headers = {
...options.headers,
'Content-Type': 'application/json',
};
}

// @TODO: AbortController polyfill
Expand Down

0 comments on commit fb74463

Please sign in to comment.