Skip to content

Commit

Permalink
fix: fix ProgressViewer background (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
krosy1337 authored Oct 13, 2023
1 parent 1da83f1 commit 6234462
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ProgressViewer/ProgressViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ export function ProgressViewer({
warningThreshold = 60,
dangerThreshold = 80,
}: ProgressViewerProps) {
let fillWidth = Math.round((parseFloat(String(value)) / parseFloat(String(capacity))) * 100);
let fillWidth =
Math.round((parseFloat(String(value)) / parseFloat(String(capacity))) * 100) || 0;
fillWidth = fillWidth > 100 ? 100 : fillWidth;
let valueText: number | string | undefined = value,
capacityText: number | string | undefined = capacity,
Expand Down

0 comments on commit 6234462

Please sign in to comment.