From b1dabee94ad07db0a4bcd99ce4f0283bbe80b5e6 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 19 Apr 2016 22:45:26 -0700 Subject: [PATCH] check that ArrayBuffer.isView exists For IE10 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 27f4fcd..12a7190 100644 --- a/index.js +++ b/index.js @@ -394,7 +394,7 @@ function byteLength (string, encoding) { if (Buffer.isBuffer(string)) { return string.length } - if (typeof ArrayBuffer !== 'undefined' && + if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' && (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) { return string.byteLength } -- 2.34.1