diff --git a/AppImage/components/virtual-machines.tsx b/AppImage/components/virtual-machines.tsx
index 0ae1cd9..9874ccf 100644
--- a/AppImage/components/virtual-machines.tsx
+++ b/AppImage/components/virtual-machines.tsx
@@ -179,11 +179,11 @@ const getModalProgressColor = (percent: number): string => {
}
const getOSIcon = (osInfo: VMDetails["os_info"] | undefined, vmType: string): React.ReactNode => {
- if (vmType !== "lxc") {
+ if (vmType !== "lxc" || !osInfo?.id) {
return null
}
- const osId = osInfo?.id?.toLowerCase()
+ const osId = osInfo.id.toLowerCase()
switch (osId) {
case "debian":
@@ -195,7 +195,7 @@ const getOSIcon = (osInfo: VMDetails["os_info"] | undefined, vmType: string): Re
case "arch":
return
default:
- return
+ return null
}
}
@@ -283,7 +283,7 @@ export function VirtualMachines() {
headers: {
"Content-Type": "application/json",
},
- body: JSON.stringify({ action }),
+ body: JSON.JSON.stringify({ action }),
})
if (response.ok) {