mirror of
https://github.com/MillironX/setup-nextflow.git
synced 2024-11-25 18:59:55 +00:00
fix: Make iterator work right
This commit is contained in:
parent
4af33538f0
commit
2f9c53c090
1 changed files with 7 additions and 15 deletions
|
@ -65,23 +65,15 @@ export async function* release_iter(
|
||||||
const { next } = iterator[Symbol.asyncIterator]()
|
const { next } = iterator[Symbol.asyncIterator]()
|
||||||
|
|
||||||
let request = await next()
|
let request = await next()
|
||||||
|
release_items = request.value.data
|
||||||
|
|
||||||
return {
|
while (true) {
|
||||||
async next() {
|
if (item_index > release_items.length) {
|
||||||
if (item_index >= release_items.length) {
|
request = await next()
|
||||||
if (request.done) {
|
release_items = request.value.data
|
||||||
return { done: true }
|
item_index = 0
|
||||||
}
|
|
||||||
|
|
||||||
request = await next()
|
|
||||||
release_items = request.value.data
|
|
||||||
item_index = 0
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
value: nextflow_release(release_items[item_index++]),
|
|
||||||
done: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
yield nextflow_release(release_items[item_index++])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue