1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: default strategy groupId failure (#4120)

This commit is contained in:
Jaanus Sellin 2023-06-29 16:40:14 +03:00 committed by GitHub
parent b99eafc9cc
commit b6f405d1af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,9 +103,16 @@ export const FeatureStrategyCreate = () => {
if (shouldUseDefaultStrategy) {
const strategyTemplate = defaultStrategy || DEFAULT_STRATEGY;
if (strategyTemplate.parameters?.groupId === '' && featureId) {
strategyTemplate.parameters.groupId = featureId;
setStrategy({
...strategyTemplate,
parameters: {
...strategyTemplate.parameters,
groupId: featureId,
},
} as any);
} else {
setStrategy(strategyTemplate as any);
}
setStrategy(strategyTemplate as any);
} else if (strategyDefinition) {
setStrategy(createFeatureStrategy(featureId, strategyDefinition));
}