We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8e535d commit 4c5868dCopy full SHA for 4c5868d
src/token.ts
@@ -20,7 +20,10 @@ async function sign(
20
encodedPayload: string
21
): Promise<string> {
22
// missing crypto global for Node.js 18
23
- const localCrypto = crypto ?? (await import('node:crypto')).webcrypto
+ const localCrypto =
24
+ typeof crypto === 'undefined'
25
+ ? (await import('node:crypto')).webcrypto
26
+ : crypto
27
28
const textEncoder = new TextEncoder()
29
0 commit comments