We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55009e5 commit 721b73bCopy full SHA for 721b73b
Libraries/Network/XMLHttpRequest.js
@@ -253,7 +253,16 @@ class XMLHttpRequest extends EventTarget(...XHR_EVENTS) {
253
break;
254
255
case 'blob':
256
- this._cachedResponse = BlobManager.createFromOptions(this._response);
+ if (this._response.toString() === '') {
257
+ this._cachedResponse = new Blob([]);
258
+ break;
259
+ }
260
+
261
+ if (typeof this._response === 'object' && this._response) {
262
+ this._cachedResponse = BlobManager.createFromOptions(this._response);
263
+ } else {
264
+ throw new Error(`Invalid response for blob: ${this._response}`);
265
266
267
268
case 'json':
0 commit comments