Skip to content

Commit

Permalink
proposed fix for facebook#18223
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Humphreys committed Jun 5, 2018
1 parent 30320f1 commit 4edc83e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Libraries/Network/XMLHttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
if (typeof this._response === 'object' && this._response) {
this._cachedResponse = BlobManager.createFromOptions(this._response);
} else {
throw new Error(`Invalid response for blob: ${this._response}`);
if (this._response === '') {
this._cachedResponse = null;
} else {
throw new Error(`Invalid response for blob: ${this._response}`);
}
}
break;

Expand Down Expand Up @@ -595,4 +599,4 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
}
}

module.exports = XMLHttpRequest;
module.exports = XMLHttpRequest;

0 comments on commit 4edc83e

Please sign in to comment.