Fix nextItem not grabbing from correct storage.
This commit is contained in:
parent
20f399bda8
commit
1c2397b8f6
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue