We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ce5f373 + 3d68100 commit 1436c36Copy full SHA for 1436c36
packages/isomorphic-unfetch/index.js
@@ -1,5 +1,6 @@
1
+function r(m){return m && m.default || m;}
2
module.exports = global.fetch = global.fetch || (
- 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);
+ typeof process=='undefined' ? r(require('unfetch')) : (function(url, opts) {
4
+ return r(require('node-fetch'))(url.replace(/^\/\//g,'https://'), opts);
5
})
6
);
0 commit comments