Skip to content

Commit

Permalink
fix: exclude 0 from truthyOrNone as it is a non-empty value
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChristophe authored Feb 16, 2024
1 parent 6d901bb commit 7fb6f1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/utility.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { type Benchmark } from '@eosc-perf/eosc-perf-client';
* @returns Either a div with gray None text or the original string.
*/
export const truthyOrNoneTag = (value: string | undefined | null, altText = 'None') => {
if (!value) {
if (!value && value !== 0) {
return (
<div className="text-muted" style={{ display: 'inline' }}>
{altText}
Expand Down

0 comments on commit 7fb6f1f

Please sign in to comment.