Skip to content

Commit

Permalink
Update merge.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt authored Apr 25, 2023
1 parent b26982a commit 1833c2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/asynciterable/merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ export class MergeAsyncIterable<T> extends AsyncIterableX<T> {
nexts[index] = <Promise<MergeResult<IteratorResult<T>>>>NEVER_PROMISE;
active--;
} else {
const iterator$ = iterators[index];
nexts[index] = <Promise<MergeResult<IteratorResult<T>>>>NEVER_PROMISE;
yield value$;
nexts[index] = wrapPromiseWithIndex(iterators[index].next(), index);
nexts[index] = wrapPromiseWithIndex(iterator$.next(), index);
}
}
}
Expand Down

0 comments on commit 1833c2a

Please sign in to comment.