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:
parent
fc6cc9a2cd
commit
88a44c03ba
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user