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:
parent
c4f8b80755
commit
8029a9d576
@ -83,7 +83,7 @@ export const FeatureStrategyCreate = () => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const { feature, refetchFeature } = useFeature(projectId, featureId);
|
const { feature, refetchFeature } = useFeature(projectId, featureId);
|
||||||
const featureEnvironment = feature?.environments.find(
|
const featureEnvironment = feature?.environments?.find(
|
||||||
(featureEnvironment) => featureEnvironment.name === environmentId,
|
(featureEnvironment) => featureEnvironment.name === environmentId,
|
||||||
);
|
);
|
||||||
const strategyCount = featureEnvironment?.strategies.length || 0;
|
const strategyCount = featureEnvironment?.strategies.length || 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user