index : matrix-js-sdk

My fork of matrix-js-sdk

diff options
context:
space:
mode:
authorBruno Windels <[email protected]>2020-06-05 13:38:46 +0200
committerBruno Windels <[email protected]>2020-06-05 15:26:17 +0200
commiteee04895fe7287b5b26ca872190a178c324dd389 (patch)
tree5331d405bac4a98f6c177748dc39224ac968fcc6
parentf520b88f79488f11cfae1484d98a6e7361e4b321 (diff)
downloadmatrix-js-sdk-eee04895fe7287b5b26ca872190a178c324dd389.tar.gz
take into account key can be an object now
-rw-r--r--src/crypto/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/index.js b/src/crypto/index.js
index 9139b3de..ef9f492d 100644
--- a/src/crypto/index.js
+++ b/src/crypto/index.js
@@ -753,7 +753,7 @@ Crypto.prototype.bootstrapSecretStorage = async function({
*
*/
export function fixBackupKey(key) {
- if (key.indexOf(",") < 0) {
+ if (typeof key !== "string" || key.indexOf(",") < 0) {
return null;
}
const fixedKey = Uint8Array.from(key.split(","), x => parseInt(x));