Skip to content

Commit 4a16a4d

Browse files
dexterlengcodebytere
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 492e2a4 commit 4a16a4d

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
@@ -189,8 +189,7 @@ ReadStream.prototype._read = function(n) {
189189
};
190190

191191
ReadStream.prototype._destroy = function(err, cb) {
192-
const isOpen = typeof this.fd !== 'number';
193-
if (isOpen) {
192+
if (typeof this.fd !== 'number') {
194193
this.once('open', closeFsStream.bind(null, this, cb, err));
195194
return;
196195
}

0 commit comments

Comments
 (0)