diff --git a/src/crypto/store/localStorage-crypto-store.js b/src/crypto/store/localStorage-crypto-store.js index 4c30b6199..af6043af1 100644 --- a/src/crypto/store/localStorage-crypto-store.js +++ b/src/crypto/store/localStorage-crypto-store.js @@ -57,6 +57,16 @@ export default class LocalStorageCryptoStore extends MemoryCryptoStore { this.store = webStore; } + static exists(webStore) { + const length = webStore.length; + for (let i = 0; i < length; i++) { + if (webStore.key(i).startsWith(E2E_PREFIX)) { + return true; + } + } + return false; + } + // Olm Sessions countEndToEndSessions(txn, func) {