From be56038382a3cdc53db5b41288de89265992cb21 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Fri, 18 Oct 2024 10:35:59 +0200 Subject: [PATCH] fix(ui): Do not render 0 values as falsy values This avoids e.g. 0 vulnerabilities being shown as "Failed" in the run overview. Signed-off-by: Sebastian Schuberth --- ui/src/components/statistics-card.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/components/statistics-card.tsx b/ui/src/components/statistics-card.tsx index f864fbc94..1e61dc54e 100644 --- a/ui/src/components/statistics-card.tsx +++ b/ui/src/components/statistics-card.tsx @@ -46,7 +46,9 @@ export const StatisticsCard = ({
-
{value ? value : 'Failed'}
+
+ {value !== undefined ? value : 'Failed'} +
{description}