mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
fix: diff component for ordering (#4552)
This commit is contained in:
parent
31e2260c46
commit
f881103701
@ -50,7 +50,10 @@ export const EnvironmentStrategyExecutionOrder = ({
|
||||
project,
|
||||
actions,
|
||||
}: IEnvironmentStrategyExecutionOrderProps) => {
|
||||
const { feature: featureData } = useFeature(project, feature);
|
||||
const { feature: featureData, loading } = useFeature(project, feature);
|
||||
|
||||
if (loading) return null;
|
||||
|
||||
const featureEnvironment = featureData.environments.find(
|
||||
({ name }) => environment === name
|
||||
);
|
||||
@ -71,9 +74,11 @@ export const EnvironmentStrategyExecutionOrder = ({
|
||||
.map(strategy => strategy.id) ?? [],
|
||||
};
|
||||
|
||||
const updatedStrategies = change.payload.map(({ id }) => {
|
||||
return environmentStrategies.find(s => s.id === id);
|
||||
});
|
||||
const updatedStrategies = change.payload
|
||||
.map(({ id }) => {
|
||||
return environmentStrategies.find(s => s.id === id);
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
const data = {
|
||||
strategyIds: updatedStrategies.map(strategy => strategy!.id),
|
||||
|
Loading…
Reference in New Issue
Block a user