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:
parent
b99eafc9cc
commit
b6f405d1af
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user