mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
fix: fall back to count === 0 if undefined / don't show "0 of undefined"
If the total number of flag is undefined, we've previously shown "0 of undefined". However, I don't think that's sensible. Instead, we should show "0".
This commit is contained in:
parent
b4ad9c964f
commit
0dee500b80
@ -84,7 +84,7 @@ export const LifecycleFilters = ({
|
||||
: allFlagsCount || undefined;
|
||||
const dynamicLabel =
|
||||
isActive && Number.isInteger(total)
|
||||
? `${label} (${total === count ? total : `${total} of ${count}`})`
|
||||
? `${label} (${total === (count ?? 0) ? total : `${total} of ${count}`})`
|
||||
: `${label}${count !== undefined ? ` (${count})` : ''}`;
|
||||
|
||||
const handleClick = () =>
|
||||
|
Loading…
Reference in New Issue
Block a user