Skip to content

Commit

Permalink
Fixed problem of "Invalid response for blob" with fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
xiamx committed Mar 13, 2018
1 parent 4a3d94e commit b35071b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Libraries/Network/XMLHttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,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

0 comments on commit b35071b

Please sign in to comment.