Skip to content

Commit b1622a2

Browse files
dexterlengrvagg
dexterleng
authored andcommitted
fs: inline typeof check
PR-URL: #24390 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Weijia Wang <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent a499db7 commit b1622a2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/internal/fs/streams.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,7 @@ ReadStream.prototype._read = function(n) {
204204
};
205205

206206
ReadStream.prototype._destroy = function(err, cb) {
207-
const isOpen = typeof this.fd !== 'number';
208-
if (isOpen) {
207+
if (typeof this.fd !== 'number') {
209208
this.once('open', closeFsStream.bind(null, this, cb, err));
210209
return;
211210
}

0 commit comments

Comments
 (0)