diff --git a/lib/response.js b/lib/response.js index f83d761..b28e6ed 100644 --- a/lib/response.js +++ b/lib/response.js @@ -102,9 +102,10 @@ Response.prototype.handle = function (res) { } }; +var GET_TYPE = ({}).toString; Response.prototype._emitData = function (res) { var respBody = this.getResponse(res); - if (respBody.toString().match(/ArrayBuffer/)) { + if (GET_TYPE.apply(respBody).match(/ArrayBuffer/)) { this.emit('data', new Uint8Array(respBody, this.offset)); this.offset = respBody.byteLength; return;