Skip to content

Commit

Permalink
fix: Check for global.fetch before binding it (#674)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbosiljcic authored and Richienb committed Sep 16, 2019
1 parent 1d5778a commit 5535c2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion browser.js
Expand Up @@ -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;
Expand Down

0 comments on commit 5535c2e

Please sign in to comment.