1
0

Fix constructor error

This commit is contained in:
Chris Johnson
2022-02-24 09:17:40 +00:00
committed by GitHub
parent b2b4492c45
commit a7e2cf0cce

View File

@@ -9,7 +9,7 @@ class Base64URL {
class JWT {
constructor() {
if (!crypto || !crypto.subtle)
if (typeof crypto === 'undefined' || !crypto.subtle)
throw new Error('Crypto not supported!')
this.algorithms = {
ES256: { name: 'ECDSA', namedCurve: 'P-256', hash: { name: 'SHA-256' } },