Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: handle cb null case
  • Loading branch information
ronag committed Apr 13, 2020
commit f229caceb73fdada91e08c02c97cdc6c0d344c7c
2 changes: 1 addition & 1 deletion lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ function closeFsStream(stream, cb, err) {
}

ReadStream.prototype.close = function(cb) {
finished(this, cb);
if (typeof cb === 'function') finished(this, cb);
this.destroy();
};

Expand Down