From aa9839ee408f929828669358d238857c1864862d 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 9954e747..2905eedb 100644 --- a/src/matrix/storage/idb/utils.ts +++ b/src/matrix/storage/idb/utils.ts @@ -206,12 +206,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; } + return NOT_DONE; }); if (!matched) { throw new StorageError("Value not found");