From a0017cb720002c8780b1dfa2041d1f4845e89da5 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 9 Aug 2021 19:13:32 -0700 Subject: [PATCH] Seemingly fix a bug in utils.ts --- src/matrix/storage/idb/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/storage/idb/utils.ts b/src/matrix/storage/idb/utils.ts index 322d2d21..b0097ce7 100644 --- a/src/matrix/storage/idb/utils.ts +++ b/src/matrix/storage/idb/utils.ts @@ -201,12 +201,12 @@ export async function findStoreValue(db: IDBDatabase, storeName: string, toCu const store = tx.objectStore(storeName); const cursor = await reqAsPromise(toCursor(store)); let match; - // @ts-ignore const matched = await iterateCursor(cursor, (value) => { if (matchesValue(value)) { match = value; - return true; + return { done: true }; } + return { done: false }; }); if (!matched) { throw new StorageError("Value not found");