Skip to content

Commit

Permalink
[fix] Use xhr.responseText if xhr.response is not provided (#483)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg authored and darrachequesne committed Oct 5, 2016
1 parent 82eea27 commit ea29487
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/transports/polling-xhr.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ Request.prototype.onLoad = function () {
contentType = this.xhr.getResponseHeader('Content-Type').split(';')[0];
} catch (e) {}
if (contentType === 'application/octet-stream') {
data = this.xhr.response;
data = this.xhr.response || this.xhr.responseText;
} else {
if (!this.supportsBinary) {
data = this.xhr.responseText;
Expand Down

0 comments on commit ea29487

Please sign in to comment.