mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-15 01:16:22 +02:00
Fix/account for missing environments (#673)
* fix: add guards * fix: remove console log * fix: remove file * fix: remove console log
This commit is contained in:
parent
7344f47635
commit
7336bc3ef6
@ -81,6 +81,8 @@ const FeatureOverviewEnvironment = ({
|
||||
{} as { [key: string]: IStrategyIconObject }
|
||||
);
|
||||
|
||||
if (!strategyObjects) return [];
|
||||
|
||||
return Object.keys(strategyObjects).map(strategyName => {
|
||||
return { ...strategyObjects[strategyName], name: strategyName };
|
||||
});
|
||||
|
@ -13,8 +13,10 @@ const FeatureOverviewEnvironmentMetrics = ({
|
||||
}: IFeatureOverviewEnvironmentMetrics) => {
|
||||
const styles = useStyles();
|
||||
|
||||
if (!environmentMetric) return null;
|
||||
|
||||
const total = environmentMetric.yes + environmentMetric.no;
|
||||
const percentage = calculatePercentage(total, environmentMetric.yes);
|
||||
const percentage = calculatePercentage(total, environmentMetric?.yes);
|
||||
|
||||
if (
|
||||
!environmentMetric ||
|
||||
|
Loading…
Reference in New Issue
Block a user