fix: Check for global.fetch before binding it (#674)
This commit is contained in:
parent
1d5778ad0d
commit
5535c2ed47
|
@ -16,7 +16,9 @@ var global = getGlobal();
|
|||
module.exports = exports = global.fetch;
|
||||
|
||||
// Needed for TypeScript and Webpack.
|
||||
exports.default = global.fetch.bind(global);
|
||||
if (global.fetch) {
|
||||
exports.default = global.fetch.bind(global);
|
||||
}
|
||||
|
||||
exports.Headers = global.Headers;
|
||||
exports.Request = global.Request;
|
||||
|
|
Loading…
Reference in New Issue