Skip to content

Commit

Permalink
fix undefined global (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
smeng9 authored Feb 23, 2023
1 parent 2eb8861 commit 8f734ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const headRegexp = /(^module.exports = \w+;?)/m
/(?:var|const) Buffer = require\('safe-buffer'\)\.Buffer;/
, `
const Buffer = require('safe-buffer').Buffer
const OurUint8Array = global.Uint8Array || function () {}
const OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
Expand Down

0 comments on commit 8f734ef

Please sign in to comment.