Skip to content

Commit ea29487

Browse files
miguelgrinbergdarrachequesne
authored andcommitted
[fix] Use xhr.responseText if xhr.response is not provided (#483)
1 parent 82eea27 commit ea29487

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/transports/polling-xhr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ Request.prototype.onLoad = function () {
341341
contentType = this.xhr.getResponseHeader('Content-Type').split(';')[0];
342342
} catch (e) {}
343343
if (contentType === 'application/octet-stream') {
344-
data = this.xhr.response;
344+
data = this.xhr.response || this.xhr.responseText;
345345
} else {
346346
if (!this.supportsBinary) {
347347
data = this.xhr.responseText;

0 commit comments

Comments
 (0)