diff options
author | LiviaMedeiros <livia@cirno.name> | 2022-05-21 12:51:01 +0300 |
---|---|---|
committer | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2022-06-11 13:18:12 +0300 |
commit | 32da6eea4347aaf6979c381a3c1fe8d1163e6a7c (patch) | |
tree | 9a914d3256b31c768c364b50a95a42e7eacf1946 | |
parent | 20b0df1d1eba957ea30ba618528debbe02a97c6a (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.js | 4 |
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; |