Skip to content

Commit

Permalink
Ensure that Blob is supported in case of DataView
Browse files Browse the repository at this point in the history
PhantomJS 1.9.8 seems to support ArrayBuffer & DataView, but not Blob.
  • Loading branch information
mislav committed Nov 11, 2016
1 parent 800f12e commit 4cc46b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fetch.js
Expand Up @@ -199,7 +199,7 @@
this._bodyText = body.toString()
} else if (!body) {
this._bodyText = ''
} else if (support.arrayBuffer && isDataView(body)) {
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
// IE 10-11 can't handle a DataView body.
this._bodyInit = new Blob([body.buffer])
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
Expand Down

0 comments on commit 4cc46b2

Please sign in to comment.