From 6a0f2f4805cfe0cf900a20de287ceb531ff83edd Mon Sep 17 00:00:00 2001 From: Shahar Mor Date: Sun, 23 Dec 2018 13:33:40 +0200 Subject: [PATCH] ArrayBuffer instanceof - Check for ctor name see https://github.com/nodejs/node/issues/20978 --- src/helpers/normalize-send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/normalize-send.js b/src/helpers/normalize-send.js index ebb209bb..9b49989c 100644 --- a/src/helpers/normalize-send.js +++ b/src/helpers/normalize-send.js @@ -1,5 +1,5 @@ export default function normalizeSendData(data) { - if (Object.prototype.toString.call(data) !== '[object Blob]' && !(data instanceof ArrayBuffer)) { + if (Object.prototype.toString.call(data) !== '[object Blob]' && !(data instanceof ArrayBuffer || (data.constructor && data.constructor.name === 'ArrayBuffer'))) { data = String(data); }