Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a16a4d

Browse filesBrowse files
dexterlengcodebytere
authored andcommitted
fs: inline typeof check
PR-URL: #24390 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 492e2a4 commit 4a16a4d
Copy full SHA for 4a16a4d

File tree

Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-2
lines changed
Open diff view settings
Collapse file

‎lib/internal/fs/streams.js‎

Copy file name to clipboardExpand all lines: lib/internal/fs/streams.js
+1-2Lines changed: 1 addition & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.