From 63016fcd679b3d8a55267412c2cedf4b967acc32 Mon Sep 17 00:00:00 2001 From: Christoph Kaser Date: Wed, 4 Feb 2026 14:08:58 +0100 Subject: [PATCH] support usage in WebWorkers --- lib/base85.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = [