Bind fetch to window in the browser (#434)

This commit is contained in:
Mark Herhold 2018-03-24 23:22:34 -04:00 committed by Timothy Gu
parent a1cbcb5706
commit d522036bee
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
module.exports = exports = window.fetch;
// Needed for TypeScript.
exports.default = window.fetch;
// Needed for TypeScript and Webpack.
exports.default = window.fetch.bind(window);
exports.Headers = window.Headers;
exports.Request = window.Request;