Skip to content

Commit

Permalink
TYPED_ARRAY_CTORS is overwritten to avoid possible ReferenceError issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Farfurix committed May 24, 2021
1 parent ddf7026 commit 27d85fe
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ var GLOBAL = (function getGlobal () {
})();

var TYPED_ARRAY_CTORS = {
'Int8Array': Int8Array,
'Uint8Array': Uint8Array,
'Uint8ClampedArray': Uint8ClampedArray,
'Int16Array': Int16Array,
'Uint16Array': Uint16Array,
'Int32Array': Int32Array,
'Uint32Array': Uint32Array,
'Float32Array': Float32Array,
'Float64Array': Float64Array
'Int8Array': typeof Int8Array !== 'undefined' ? Int8Array : void 0,
'Uint8Array': typeof Uint8Array !== 'undefined' ? Uint8Array : void 0,
'Uint8ClampedArray': typeof Uint8ClampedArray !== 'undefined' ? Uint8ClampedArray : void 0,
'Int16Array': typeof Int16Array !== 'undefined' ? Int16Array : void 0,
'Uint16Array': typeof Uint16Array !== 'undefined' ? Uint16Array : void 0,
'Int32Array': typeof Int32Array !== 'undefined' ? Int32Array : void 0,
'Uint32Array': typeof Uint32Array !== 'undefined' ? Uint32Array : void 0,
'Float32Array': typeof Float32Array !== 'undefined' ? Float32Array : void 0,
'Float64Array': typeof Float64Array !== 'undefined' ? Float64Array : void 0
};

var ARRAY_BUFFER_SUPPORTED = typeof ArrayBuffer === 'function';
Expand Down

0 comments on commit 27d85fe

Please sign in to comment.