diff --git a/lib/base85.js b/lib/base85.js index 79dcddf..4b7a810 100644 --- a/lib/base85.js +++ b/lib/base85.js @@ -10,7 +10,7 @@ const SING85 = 85; const DEFAULT_ENCODING = 'z85'; -const LBigInt = typeof window !== 'undefined' ? window.BigInt : global.BigInt; +const LBigInt = typeof window !== 'undefined' ? window.BigInt : typeof self !== 'undefined' ? self.BigInt : global.BigInt; /* Characters to allow (and ignore) in an encoded buffer */ const IGNORE_CHARS = [