Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit ce637a5

Browse files
committed
test(iterators): Fix error handling.
1 parent 6ee58f9 commit ce637a5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/utils/iterators.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,6 @@ export function pipeline(iterables = [], onFinally = defaultOnFinally, { end, ..
351351
firstSrc = v
352352
}
353353

354-
iterables.forEach((nextIterable) => {
355-
if (nextIterable.cancel) {
356-
cancelFns.add(nextIterable)
357-
}
358-
})
359-
360354
const last = iterables.reduce((_prev, next, index) => {
361355
const it = CancelableGenerator((async function* Gen() {
362356
const prev = index === 0 ? firstSrc : _prev
@@ -386,8 +380,7 @@ export function pipeline(iterables = [], onFinally = defaultOnFinally, { end, ..
386380
return it
387381
}, undefined)
388382

389-
pipelineValue = iteratorFinally(last, async (err) => {
390-
error = AggregatedError.from(error, err)
383+
pipelineValue = iteratorFinally(last, async () => {
391384
if (!cancelled) {
392385
await cancelAll(error)
393386
}

0 commit comments

Comments
 (0)