Skip to content

Commit

Permalink
fix: make sure headers constructor receive sth
Browse files Browse the repository at this point in the history
not null
  • Loading branch information
jd1378 committed Jul 27, 2022
1 parent 0c8c16a commit 6005f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function wrapFetch(options?: WrapFetchOptions) {
const interceptedInit = init || {};

if (!(interceptedInit.headers instanceof Headers)) {
interceptedInit.headers = new Headers(interceptedInit.headers);
interceptedInit.headers = new Headers(interceptedInit.headers || {});
}

{
Expand Down

0 comments on commit 6005f59

Please sign in to comment.