1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-02 17:02:31 +03:00

Check for the whole thing being null

This commit is contained in:
David Baker
2020-01-27 16:25:08 +00:00
parent 61c5430deb
commit f38b4d37e6

View File

@@ -363,7 +363,8 @@ export class SecretStorage extends EventEmitter {
async isStored(name, checkKey) {
// check if secret exists
let secretInfo = await this._baseApis.getAccountDataFromServer(name);
if (!secretInfo || !secretInfo.encrypted) {
if (!secretInfo) return false;
if (!secretInfo.encrypted) {
// try to fix it up
secretInfo = await this._fixupStoredSecret(name, secretInfo);
if (!secretInfo || !secretInfo.encrypted) {