Skip to content

Commit

Permalink
Fixing crypto polyfill for Node 20+
Browse files Browse the repository at this point in the history
  • Loading branch information
Pauan committed Oct 4, 2023
1 parent 439d273 commit 0ce0f9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/src/polyfill/crypto.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { webcrypto } from "node:crypto";

(globalThis as any).crypto = webcrypto;
if ((globalThis as any).crypto == null) {
(globalThis as any).crypto = webcrypto;
}

0 comments on commit 0ce0f9e

Please sign in to comment.