Skip to content

Commit 7b5cb14

Browse 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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/cluster/worker.js

+3-1
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)