diff --git a/async/mux_async_iterator.ts b/async/mux_async_iterator.ts index 2bfd96b0e8f5..1bb4802881af 100644 --- a/async/mux_async_iterator.ts +++ b/async/mux_async_iterator.ts @@ -73,8 +73,7 @@ export class MuxAsyncIterator implements AsyncIterable { await this.#signal.promise; // Note that while we're looping over `yields`, new items may be added. - for (let i = 0; i < this.#yields.length; i++) { - const { iterator, value } = this.#yields[i]; + for (const { iterator, value } of this.#yields) { yield value; this.#callIteratorNext(iterator); }