File tree 2 files changed +2
-2
lines changed
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');
41
41
/*</replacement>*/
42
42
43
43
const 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 ( ) { } ;
45
45
function _uint8ArrayToBuffer ( chunk ) {
46
46
return Buffer . from ( chunk ) ;
47
47
}
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ var Stream = require('./internal/streams/stream');
63
63
/*</replacement>*/
64
64
65
65
const 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 ( ) { } ;
67
67
function _uint8ArrayToBuffer ( chunk ) {
68
68
return Buffer . from ( chunk ) ;
69
69
}
You can’t perform that action at this time.
0 commit comments