Skip to content

Commit

Permalink
Merge pull request #304 from ryanto/simple-cors
Browse files Browse the repository at this point in the history
  • Loading branch information
xg-wang authored May 19, 2020
2 parents b38a2b0 + ba46dd0 commit f2142bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/create-passthrough.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function createPassthrough(fakeXHR, nativeXMLHttpRequest) {
// set the on- handler on the native xhr's `upload` property for
// the given eventType
function createUploadHandler(eventType) {
if (xhr.upload) {
if (xhr.upload && fakeXHR.upload && fakeXHR.upload['on' + eventType]) {
xhr.upload['on' + eventType] = function (event) {
dispatchEvent(fakeXHR.upload, eventType, event);
};
Expand Down

0 comments on commit f2142bc

Please sign in to comment.