diff --git a/src/crypt/decrypter.js b/src/crypt/decrypter.js index db2633b47d9..b51f24ebf23 100644 --- a/src/crypt/decrypter.js +++ b/src/crypt/decrypter.js @@ -23,7 +23,9 @@ class Decrypter { if (removePKCS7Padding) { try { const browserCrypto = global.crypto; - this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle; + if (browserCrypto) { + this.subtle = browserCrypto.subtle || browserCrypto.webkitSubtle; + } } catch (e) {} } this.disableWebCrypto = !this.subtle;