Skip to content

Commit 20acd1b

Browse files
author
meister03
committed
small fix
1 parent 1a7ff32 commit 20acd1b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "discord-hybrid-sharding",
3-
"version": "1.7.3",
3+
"version": "1.7.4",
44
"description": "The first package which combines sharding manager & internal sharding to save a lot of resources, which allows clustering!",
55
"main": "index.js",
66
"types": "./typings.d.ts",

src/Core/Cluster.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ class Cluster extends EventEmitter {
275275
* @event Cluster#death
276276
* @param {Child|Worker} process Child process/worker that exited
277277
*/
278-
if (options.reason !== 'reclustering') this.emit('death', this.thread.process);
278+
if (options?.reason !== 'reclustering') this.emit('death', this.thread.process);
279279
if (respawn) {
280280
this.manager._debug(
281281
'[DEATH] Cluster died, attempting respawn | Restarts Left: ' +
282282
(this.restarts.max - this.restarts.current),
283283
this.id,
284284
);
285285
} else {
286-
this.manager._debug('[KILL] Cluster killed with reason: ' + (options.reason || 'not given'), this.id);
286+
this.manager._debug('[KILL] Cluster killed with reason: ' + (options?.reason || 'not given'), this.id);
287287
}
288288

289289
this.ready = false;

0 commit comments

Comments
 (0)