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 7b5cb14

Browse filesBrowse files
LiviaMedeirosdanielleadams
authored andcommitted
cluster: use kEmptyObject
PR-URL: #43159 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 4109ddc commit 7b5cb14
Copy full SHA for 7b5cb14

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎lib/internal/cluster/worker.js‎

Copy file name to clipboardExpand all lines: lib/internal/cluster/worker.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const {
77

88
const EventEmitter = require('events');
99

10+
const { kEmptyObject } = require('internal/util');
11+
1012
module.exports = Worker;
1113

1214
// Common Worker implementation shared between the cluster primary and workers.
@@ -17,7 +19,7 @@ function Worker(options) {
1719
ReflectApply(EventEmitter, this, []);
1820

1921
if (options === null || typeof options !== 'object')
20-
options = {};
22+
options = kEmptyObject;
2123

2224
this.exitedAfterDisconnect = undefined;
2325

0 commit comments

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