forked from Mastodon/mastoradio-la-radio-di-mastodon
hashtagsIterator are now finite
This commit is contained in:
parent
4aa79dc376
commit
6ea7de42f4
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue