fix #1612: added WebCrypto check back

This commit is contained in:
antelle 2020-10-02 18:07:46 +02:00
parent dbf212f0df
commit ad978d2ed3
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
1 changed files with 8 additions and 1 deletions

View File

@ -4,7 +4,8 @@ const FeatureTester = {
test() {
return Promise.resolve()
.then(() => this.checkWebAssembly())
.then(() => this.checkLocalStorage());
.then(() => this.checkLocalStorage())
.then(() => this.checkWebCrypto());
},
checkWebAssembly() {
@ -28,6 +29,12 @@ const FeatureTester = {
} catch (e) {
throw 'LocalStorage is not supported';
}
},
checkWebCrypto() {
if (!global.crypto.subtle) {
throw 'WebCrypto is not supported';
}
}
};