Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiviaMedeiros <livia@cirno.name>2022-05-21 12:51:01 +0300
committerAntoine du Hamel <duhamelantoine1995@gmail.com>2022-06-11 13:18:12 +0300
commit32da6eea4347aaf6979c381a3c1fe8d1163e6a7c (patch)
tree9a914d3256b31c768c364b50a95a42e7eacf1946
parent20b0df1d1eba957ea30ba618528debbe02a97c6a (diff)
cluster: use `kEmptyObject`
PR-URL: https://github.com/nodejs/node/pull/43159 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
-rw-r--r--lib/internal/cluster/worker.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/internal/cluster/worker.js b/lib/internal/cluster/worker.js
index 53285413530..d5dfef43871 100644
--- a/lib/internal/cluster/worker.js
+++ b/lib/internal/cluster/worker.js
@@ -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.
@@ -17,7 +19,7 @@ function Worker(options) {
ReflectApply(EventEmitter, this, []);
if (options === null || typeof options !== 'object')
- options = {};
+ options = kEmptyObject;
this.exitedAfterDisconnect = undefined;