Fix nextItem not grabbing from correct storage.

This commit is contained in:
Bauke 2023-05-04 13:12:42 +02:00
parent 20f399bda8
commit 1c2397b8f6
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,7 @@ await setup(
// Make sure `nextItem()` returns an item.
let storedNext = await nextItem();
if (storedNext === undefined) {
if (storedNext === undefined || storedNext.value === undefined) {
throw new Error("Expected an item");
}

View File

@ -178,6 +178,7 @@ export async function nextItem(): Promise<Value<Item> | undefined> {
// means passing undefined here is fine as it won't be used.
value: undefined!,
serialize: serializeItem,
storage: storageForPrefix(itemKeyPrefix),
});
}