1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

chore: conditional accessorr

This commit is contained in:
Thomas Heartman 2024-11-27 08:15:34 +01:00
parent c4f8b80755
commit 8029a9d576
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -83,7 +83,7 @@ export const FeatureStrategyCreate = () => {
const navigate = useNavigate();
const { feature, refetchFeature } = useFeature(projectId, featureId);
const featureEnvironment = feature?.environments.find(
const featureEnvironment = feature?.environments?.find(
(featureEnvironment) => featureEnvironment.name === environmentId,
);
const strategyCount = featureEnvironment?.strategies.length || 0;