Skip to content

Commit 6030c87

Browse files
authored
Merge branch 'master' into refactor-and-tests
2 parents be0e6cd + 1436c36 commit 6030c87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
function r(m){return m && m.default || m;}
12
module.exports = global.fetch = global.fetch || (
2-
typeof process=='undefined' ? (require('unfetch').default || require('unfetch')) : (function(url, opts) {
3-
return (require('node-fetch').default || require('node-fetch'))(url.replace(/^\/\//g,'https://'), opts);
3+
typeof process=='undefined' ? r(require('unfetch')) : (function(url, opts) {
4+
return r(require('node-fetch'))(url.replace(/^\/\//g,'https://'), opts);
45
})
56
);

0 commit comments

Comments
 (0)