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
fs: inline typeof check
  • Loading branch information
dexterleng committed Nov 16, 2018
commit 9392d6733f38170da428b044402fa58ad8f1e053
3 changes: 1 addition & 2 deletions lib/internal/fs/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ ReadStream.prototype._read = function(n) {
};

ReadStream.prototype._destroy = function(err, cb) {
const isOpen = typeof this.fd === 'number';
if (!isOpen) {
if (typeof this.fd !== 'number') {
this.once('open', closeFsStream.bind(null, this, cb, err));
return;
}
Expand Down