Skip to content

Commit

Permalink
Merge branch 'master' into refactor-and-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kalisjoshua committed Feb 19, 2020
2 parents be0e6cd + 1436c36 commit 6030c87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/isomorphic-unfetch/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function r(m){return m && m.default || m;}
module.exports = global.fetch = global.fetch || (
typeof process=='undefined' ? (require('unfetch').default || require('unfetch')) : (function(url, opts) {
return (require('node-fetch').default || require('node-fetch'))(url.replace(/^\/\//g,'https://'), opts);
typeof process=='undefined' ? r(require('unfetch')) : (function(url, opts) {
return r(require('node-fetch'))(url.replace(/^\/\//g,'https://'), opts);
})
);

0 comments on commit 6030c87

Please sign in to comment.