Skip to content

Commit

Permalink
fix: cannot use ali-oss in webworker (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
weiyie authored Nov 23, 2020
1 parent 6c77ecc commit afb07f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
"dependencies": {
"address": "^1.0.0",
"agentkeepalive": "^3.4.1",
"any-promise": "^1.3.0",
"bowser": "^1.6.0",
"co-defer": "^1.0.0",
"copy-to": "^2.0.1",
Expand Down
6 changes: 1 addition & 5 deletions shims/xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ exports.request = function request(url, args, callback) {
return exports.requestWithCallback(url, args, callback);
}

// Promise
if (!_Promise) {
_Promise = require('any-promise');
}
return new _Promise(function (resolve, reject) {
return new Promise(function (resolve, reject) {
exports.requestWithCallback(url, args, makeCallback(resolve, reject));
});
};
Expand Down

0 comments on commit afb07f3

Please sign in to comment.