1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-21 13:47:39 +02:00

chore: optional access

This commit is contained in:
Thomas Heartman 2024-11-26 09:22:02 +01:00
parent fc6cc9a2cd
commit 88a44c03ba
No known key found for this signature in database
GPG Key ID: BD1F880DAED1EE78

View File

@ -15,8 +15,9 @@ export const useCurrentStrategy = (
environmentName: string,
) => {
const { feature: currentFeature } = useFeature(project, feature);
const currentStrategy = currentFeature?.environments
.find((environment) => environment.name === environmentName)
?.find((environment) => environment.name === environmentName)
?.strategies.find(
(strategy) =>
'id' in change.payload && strategy.id === change.payload.id,