mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-10 17:53:36 +02:00
fix: default strategy groupId failure (#4120)
This commit is contained in:
parent
2c51ccef51
commit
d21640a051
@ -103,9 +103,16 @@ export const FeatureStrategyCreate = () => {
|
|||||||
if (shouldUseDefaultStrategy) {
|
if (shouldUseDefaultStrategy) {
|
||||||
const strategyTemplate = defaultStrategy || DEFAULT_STRATEGY;
|
const strategyTemplate = defaultStrategy || DEFAULT_STRATEGY;
|
||||||
if (strategyTemplate.parameters?.groupId === '' && featureId) {
|
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) {
|
} else if (strategyDefinition) {
|
||||||
setStrategy(createFeatureStrategy(featureId, strategyDefinition));
|
setStrategy(createFeatureStrategy(featureId, strategyDefinition));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user