Fix calculate memory when no cache value

This commit is contained in:
shamoon 2023-03-28 15:51:55 -07:00
parent e549a87719
commit dde188c3c4

View file

@ -11,5 +11,5 @@ export function calculateCPUPercent(stats) {
}
export function calculateUsedMemory(stats) {
return stats.memory_stats.usage - stats.memory_stats.stats.cache
return stats.memory_stats.usage - (stats.memory_stats.stats.cache ?? 0)
}