From ea294874889db6b727717b6e4f51a3d824215695 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Tue, 4 Oct 2016 22:31:28 -0700 Subject: [PATCH] [fix] Use xhr.responseText if xhr.response is not provided (#483) --- lib/transports/polling-xhr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transports/polling-xhr.js b/lib/transports/polling-xhr.js index 9a691bcb3..68f33373c 100755 --- a/lib/transports/polling-xhr.js +++ b/lib/transports/polling-xhr.js @@ -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;