Skip to content

Commit 11fe4f2

Browse files
benjamingraduh95
authored andcommitted
fixup! comment
1 parent 0f9324a commit 11fe4f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/streams/from.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ function from(Readable, iterable, opts) {
5353
readable._destroy = function(error, cb) {
5454
PromisePrototypeThen(
5555
close(error),
56-
() => cb(error),
57-
(e) => cb(error ?? e)
56+
() => process.nextTick(cb, error), // nextTick is here in case cb throws
57+
(e) => process.nextTick(cb, error || e),
5858
);
5959
};
6060

0 commit comments

Comments
 (0)