File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import realFetch from "node-fetch";
2
2
import wrapper from "./wrapper" ;
3
3
4
4
if ( ! global . fetch ) {
5
- global . fetch = module . exports ;
5
+ global . fetch = realFetch ;
6
6
global . Response = realFetch . Response ;
7
7
global . Headers = realFetch . Headers ;
8
8
global . Request = realFetch . Request ;
Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ import qs from "qs";
2
2
import { pickBy , identity } from "lodash" ;
3
3
import createError from "http-errors" ;
4
4
5
- const realFetch = fetch || window . fetch || global . fetch ;
6
-
7
5
/**
8
6
* A wrapper of fetch
9
7
*
@@ -23,7 +21,7 @@ export default async function(url, opt = {}) {
23
21
...headers ,
24
22
} ;
25
23
26
- const res = await realFetch (
24
+ const res = await fetch (
27
25
endpoint ,
28
26
pickBy (
29
27
{
You can’t perform that action at this time.
0 commit comments