Skip to content

Commit

Permalink
fix: global buffer polyfiil (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bean authored Apr 10, 2024
1 parent 7ec1caa commit 618fbf8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/auth-browser/src/lib/chains/eth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ import {
} from '@lit-protocol/misc';
import { getStorageItem } from '@lit-protocol/misc-browser';

if (typeof global.Buffer === 'undefined') {
if (global && typeof global.Buffer === 'undefined') {
global.Buffer = BufferPolyfill;
}

if (globalThis && typeof globalThis.Buffer === 'undefined') {
globalThis.Buffer = BufferPolyfill;
}

// log("naclUtil:", naclUtil);
// log("nacl:", nacl);

Expand Down

0 comments on commit 618fbf8

Please sign in to comment.