Skip to content

Commit

Permalink
Change getResponse to return xhr.response if responseType == 'blob' a…
Browse files Browse the repository at this point in the history
…nd responseBlob doesn't exist

responseBlob doesn't exist in the latest Chrome. I'm thinking responseBlob is deprecated, as it was part of the deprecated BlobBuilder API
  • Loading branch information
coverslide committed Feb 20, 2013
1 parent e50b0fb commit 88a4a18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function parseHeaders (res) {

Response.prototype.getResponse = function (xhr) {
var respType = String(xhr.responseType).toLowerCase();
if (respType === 'blob') return xhr.responseBlob;
if (respType === 'blob') return xhr.responseBlob || xhr.response;
if (respType === 'arraybuffer') return xhr.response;
return xhr.responseText;
}
Expand Down

0 comments on commit 88a4a18

Please sign in to comment.