Check if cluster entry exists before showing memory usage in stats
This commit is contained in:
parent
3b4b302634
commit
f62775df61
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ class StatsCommand extends Command {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Cluster Memory Usage",
|
"name": "Cluster Memory Usage",
|
||||||
"value": stats ? `${stats.clusters[this.cluster].ram.toFixed(2)} MB` : `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MB`,
|
"value": stats && stats.clusters[this.cluster] ? `${stats.clusters[this.cluster].ram.toFixed(2)} MB` : `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MB`,
|
||||||
"inline": true
|
"inline": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue