1
0

Merge pull request #8 from workeffortwaste/fix-constructor-error

Fix constructor error
This commit is contained in:
Toby Schneider
2022-02-27 15:55:38 +01:00
committed by GitHub

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' } },