Skip to content

Commit a30617d

Browse files
authored
Merge pull request #4189 from Dokploy/fix/monitoring-cpu-value-type-guard
fix: add runtime type guard for cpu.value in monitoring tab
2 parents aeda19d + b079cbd commit a30617d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/dokploy/components/dashboard/monitoring/free/container/show-free-container-monitoring.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,11 @@ export const ContainerFreeMonitoring = ({
220220
<CardContent>
221221
<div className="flex flex-col gap-2 w-full">
222222
<span className="text-sm text-muted-foreground">
223-
Used: {currentData.cpu.value}
223+
Used: {String(currentData.cpu.value ?? "0%")}
224224
</span>
225225
<Progress
226226
value={Number.parseInt(
227-
currentData.cpu.value.replace("%", ""),
227+
String(currentData.cpu.value ?? "0%").replace("%", ""),
228228
10,
229229
)}
230230
className="w-[100%]"

0 commit comments

Comments
 (0)