Skip to content

Commit

Permalink
cluster: use kEmptyObject
Browse files Browse the repository at this point in the history
PR-URL: #43159
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
LiviaMedeiros authored and danielleadams committed Jun 13, 2022
1 parent 4109ddc commit 7b5cb14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/internal/cluster/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const {

const EventEmitter = require('events');

const { kEmptyObject } = require('internal/util');

module.exports = Worker;

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

if (options === null || typeof options !== 'object')
options = {};
options = kEmptyObject;

this.exitedAfterDisconnect = undefined;

Expand Down

0 comments on commit 7b5cb14

Please sign in to comment.