From 46d06aecabc611bcaa380455c13599cb593375cf Mon Sep 17 00:00:00 2001
From: "Kevin \"Schmidty\" Smith" <shenanigans@kaztl.com>
Date: Thu, 9 Apr 2015 02:16:27 -0700
Subject: [PATCH] Update response.js

---
 lib/response.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;