index : matrix-js-sdk

My fork of matrix-js-sdk

diff options
context:
space:
mode:
authorBruno Windels <[email protected]>2020-06-05 13:38:15 +0200
committerBruno Windels <[email protected]>2020-06-05 13:38:15 +0200
commit8f62703bf288cefeafc8b5fa3de65eb1e7cc020e (patch)
treed2979b3d70c9606ad1ec5e255a71863df7cf33ed
parent6dedae2e4d493409e39b43c3eb3885997795a5b4 (diff)
downloadmatrix-js-sdk-8f62703bf288cefeafc8b5fa3de65eb1e7cc020e.tar.gz
fix type check in migration code
-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 e9812e0b..9139b3de 100644
--- a/src/crypto/index.js
+++ b/src/crypto/index.js
@@ -844,7 +844,7 @@ Crypto.prototype.getSessionBackupPrivateKey = async function() {
});
// make sure we have a Uint8Array, rather than a string
- if (key && typeof(key === "string")) {
+ if (key && typeof key === "string") {
key = new Uint8Array(olmlib.decodeBase64(fixBackupKey(key) || key));
await this.storeSessionBackupPrivateKey(key);
}