From c4f8b80755d8572584567fc9494d7a5eb67b1413 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 27 Nov 2024 08:14:33 +0100 Subject: [PATCH] chore: conditional access --- frontend/src/component/feature/FeatureView/FeatureView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/component/feature/FeatureView/FeatureView.tsx b/frontend/src/component/feature/FeatureView/FeatureView.tsx index 2ea142a28324..ddc9166c58c8 100644 --- a/frontend/src/component/feature/FeatureView/FeatureView.tsx +++ b/frontend/src/component/feature/FeatureView/FeatureView.tsx @@ -130,7 +130,7 @@ export const StyledLink = styled(Link)(() => ({ const useLegacyVariants = (environments: IFeatureToggle['environments']) => { const enableLegacyVariants = useUiFlag('enableLegacyVariants'); - const existingLegacyVariantsExist = environments.some( + const existingLegacyVariantsExist = environments?.some( (environment) => environment.variants?.length, ); return enableLegacyVariants || existingLegacyVariantsExist;