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.
|
// Make sure `nextItem()` returns an item.
|
||||||
let storedNext = await nextItem();
|
let storedNext = await nextItem();
|
||||||
if (storedNext === undefined) {
|
if (storedNext === undefined || storedNext.value === undefined) {
|
||||||
throw new Error("Expected an item");
|
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.
|
// means passing undefined here is fine as it won't be used.
|
||||||
value: undefined!,
|
value: undefined!,
|
||||||
serialize: serializeItem,
|
serialize: serializeItem,
|
||||||
|
storage: storageForPrefix(itemKeyPrefix),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue