File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ var Stream = require('./internal/streams/stream');
4141/*</replacement>*/
4242
4343const Buffer = require ( 'buffer' ) . Buffer ;
44- const OurUint8Array = global . Uint8Array || function ( ) { } ;
44+ const OurUint8Array = ( typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : { } ) . Uint8Array || function ( ) { } ;
4545function _uint8ArrayToBuffer ( chunk ) {
4646 return Buffer . from ( chunk ) ;
4747}
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ var Stream = require('./internal/streams/stream');
6363/*</replacement>*/
6464
6565const Buffer = require ( 'buffer' ) . Buffer ;
66- const OurUint8Array = global . Uint8Array || function ( ) { } ;
66+ const OurUint8Array = ( typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : { } ) . Uint8Array || function ( ) { } ;
6767function _uint8ArrayToBuffer ( chunk ) {
6868 return Buffer . from ( chunk ) ;
6969}
You can’t perform that action at this time.
0 commit comments