mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-08 06:38:46 +00:00
Fix calculate memory when no cache value
This commit is contained in:
parent
e549a87719
commit
dde188c3c4
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue