Skip to content

Commit

Permalink
fix(ui): Do not render 0 values as falsy values
Browse files Browse the repository at this point in the history
This avoids e.g. 0 vulnerabilities being shown as "Failed" in the run
overview.

Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Oct 18, 2024
1 parent e8dd7cc commit be56038
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/components/statistics-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export const StatisticsCard = ({
</CardHeader>
<CardContent className='text-sm'>
<div className='flex flex-col'>
<div className='text-2xl font-bold'>{value ? value : 'Failed'}</div>
<div className='text-2xl font-bold'>
{value !== undefined ? value : 'Failed'}
</div>
<div className='text-xs'>{description}</div>
</div>
</CardContent>
Expand Down

0 comments on commit be56038

Please sign in to comment.