Skip to content

Commit d0a4b32

Browse files
committed
fixup! comment
1 parent d8edee6 commit d0a4b32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/streams/from.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ function from(Readable, iterable, opts) {
5151

5252
readable._destroy = function(error, cb) {
5353
close(error).then(
54-
() => cb(error),
55-
(e) => cb(error ?? e)
54+
() => process.nextTick(cb, error), // nextTick is here in case cb throws
55+
(e) => process.nextTick(cb, error || e),
5656
);
5757
};
5858

0 commit comments

Comments
 (0)