Support web workers (#487)

Fixes: #485
This commit is contained in:
Timothy Gu 2018-07-22 09:21:46 -07:00 committed by GitHub
parent b091ab5917
commit ed9e886cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -1,8 +1,10 @@
module.exports = exports = window.fetch;
"use strict";
module.exports = exports = self.fetch;
// Needed for TypeScript and Webpack.
exports.default = window.fetch.bind(window);
exports.default = self.fetch.bind(self);
exports.Headers = window.Headers;
exports.Request = window.Request;
exports.Response = window.Response;
exports.Headers = self.Headers;
exports.Request = self.Request;
exports.Response = self.Response;