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 71343b6

Browse filesBrowse files
cjihrigevanlucas
authored andcommitted
child_process: reuse existing no-op function
The internal/child_process module has an existing no-op function. This commit utilizes that function, instead of creating extraneous closures. PR-URL: #8164 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
1 parent 498238f commit 71343b6
Copy full SHA for 71343b6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎lib/internal/child_process.js‎

Copy file name to clipboardExpand all lines: lib/internal/child_process.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const handleConversion = {
8787
// remove handle from socket object, it will be closed when the socket
8888
// will be sent
8989
if (!options.keepOpen) {
90-
handle.onread = function() {};
90+
handle.onread = nop;
9191
socket._handle = null;
9292
}
9393

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.