We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b18514a commit d000a0aCopy full SHA for d000a0a
src/fetch-wrapper.ts
@@ -27,7 +27,9 @@ export default function fetchWrapper(
27
let url: string;
28
29
const fetch: typeof nodeFetch =
30
- (requestOptions.request && requestOptions.request.fetch) || nodeFetch;
+ (requestOptions.request && requestOptions.request.fetch) ||
31
+ globalThis.fetch ||
32
+ /* istanbul ignore next */ nodeFetch;
33
34
return fetch(
35
requestOptions.url,
@@ -115,7 +117,6 @@ export default function fetchWrapper(
115
117
116
118
return getResponseData(response);
119
})
-
120
.then((data) => {
121
return {
122
status,
@@ -124,7 +125,6 @@ export default function fetchWrapper(
124
125
data,
126
};
127
128
.catch((error) => {
129
if (error instanceof RequestError) throw error;
130
0 commit comments