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");