hashtagsIterator are now finite

This commit is contained in:
wryk 2020-03-06 13:25:09 +01:00
parent 4aa79dc376
commit 6ea7de42f4
1 changed files with 7 additions and 1 deletions

View File

@ -119,7 +119,13 @@ export async function* hashtagsIterator(domain, hashtags) {
if (buffer.length > 0) { if (buffer.length > 0) {
yield buffer.pop() yield buffer.pop()
} else { } else {
yield (await timelineGenerator.next()).value const { done, value } = await timelineGenerator.next()
if (done) {
break
} else {
yield value
}
} }
} }
} finally { } finally {