Skip to content

Commit

Permalink
fix: resolve headers when cross fetch is not available in environment (
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Aug 2, 2022
1 parent a7ac904 commit 55b1bf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const resolveHeaders = (headers: Dom.RequestInit['headers']): Record<string, str
if (headers) {
if (
(typeof Headers !== 'undefined' && headers instanceof Headers) ||
headers instanceof CrossFetch.Headers
(CrossFetch && CrossFetch.Headers && headers instanceof CrossFetch.Headers)
) {
oHeaders = HeadersInstanceToPlainObject(headers)
} else if (Array.isArray(headers)) {
Expand Down

0 comments on commit 55b1bf5

Please sign in to comment.