index : matrix-js-sdk

My fork of matrix-js-sdk

diff options
context:
space:
mode:
authorBruno Windels <[email protected]>2020-04-09 15:58:43 +0000
committerGitHub <[email protected]>2020-04-09 15:58:43 +0000
commitcc8e8434ecc2ab8be7fae9f641d8716b03eb5a67 (patch)
treeaeaf159baf4e39cb2e2eb343b9e8c5fc50501ef1
parent1b94b3c4def3e06e9ad260e6d0fad2f6261971f0 (diff)
downloadmatrix-js-sdk-cc8e8434ecc2ab8be7fae9f641d8716b03eb5a67.tar.gz
Update src/crypto/SecretStorage.js
Co-Authored-By: J. Ryan Stinnett <[email protected]>
-rw-r--r--src/crypto/SecretStorage.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/SecretStorage.js b/src/crypto/SecretStorage.js
index fc4420d3..fba19f47 100644
--- a/src/crypto/SecretStorage.js
+++ b/src/crypto/SecretStorage.js
@@ -363,7 +363,7 @@ export class SecretStorage extends EventEmitter {
}
}
- if (Object.keys(keys) === 0) {
+ if (Object.keys(keys).length === 0) {
throw new Error(`Could not decrypt ${name} because none of ` +
`the keys it is encrypted with are for a supported algorithm`);
}