update virtual-machines.tsx

This commit is contained in:
MacRimi
2026-04-05 11:51:26 +02:00
parent 5826b0419b
commit e9851da12f
6 changed files with 59 additions and 29 deletions

View File

@@ -621,7 +621,8 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => {
}
}
const safeVMData = vmData || []
// Ensure vmData is always an array (backend may return object on error)
const safeVMData = Array.isArray(vmData) ? vmData : []
// Total allocated RAM for ALL VMs/LXCs (running + stopped)
const totalAllocatedMemoryGB = useMemo(() => {