forked from mystiq/hydrogen-web
Seemingly fix a bug in utils.ts
This commit is contained in:
parent
cd9fe360a4
commit
aa9839ee40
1 changed files with 2 additions and 2 deletions
|
@ -206,12 +206,12 @@ export async function findStoreValue<T>(db: IDBDatabase, storeName: string, toCu
|
||||||
const store = tx.objectStore(storeName);
|
const store = tx.objectStore(storeName);
|
||||||
const cursor = await reqAsPromise(toCursor(store));
|
const cursor = await reqAsPromise(toCursor(store));
|
||||||
let match;
|
let match;
|
||||||
// @ts-ignore
|
|
||||||
const matched = await iterateCursor<T>(cursor, (value) => {
|
const matched = await iterateCursor<T>(cursor, (value) => {
|
||||||
if (matchesValue(value)) {
|
if (matchesValue(value)) {
|
||||||
match = value;
|
match = value;
|
||||||
return true;
|
return DONE;
|
||||||
}
|
}
|
||||||
|
return NOT_DONE;
|
||||||
});
|
});
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
throw new StorageError("Value not found");
|
throw new StorageError("Value not found");
|
||||||
|
|
Loading…
Reference in a new issue