From 03ace8ccaa3305ccad4303c7890e41c7c1e2bf24 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 10 Dec 2013 19:56:16 -0800 Subject: [PATCH] don't assume existence of Uint8Array --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 76564ef..7edee49 100644 --- a/index.js +++ b/index.js @@ -21,7 +21,7 @@ var xUint8Array = typeof Uint8Array === 'undefined' */ var browserSupport = (function () { try { - var arr = new Uint8Array(0) + var arr = new xUint8Array(0) arr.foo = function () { return 42 } return 42 === arr.foo() } catch (e) { @@ -34,7 +34,7 @@ var browserSupport = (function () { * since they don't support Proxy. Without that, it is not possible to augment * native Uint8Array instances in Firefox. */ -if (xUint8Array === Uint8Array && !browserSupport) { +if (xUint8Array !== TA.Uint8Array && !browserSupport) { xDataView = TA.DataView xArrayBuffer = TA.ArrayBuffer xUint8Array = TA.Uint8Array -- 2.34.1