diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 6f747cc3c8c63f..6c9910703adbaa 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -189,8 +189,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; }