fix: paginator watch (#2613)

zio/stable
patak 2024-02-24 15:51:51 +01:00 committed by GitHub
parent 3769176eaa
commit 1fefb6e5b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -29,11 +29,11 @@ export function usePaginator<T, P, U = T>(
prevItems.value = [] prevItems.value = []
} }
watch(() => stream, async (stream) => { watch(stream, async (stream) => {
if (!stream.value) if (!stream)
return return
for await (const entry of stream.value) { for await (const entry of stream) {
if (entry.event === 'update') { if (entry.event === 'update') {
const status = entry.payload const status = entry.payload