mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
avoid exception if missing strategy
This commit is contained in:
parent
230522cc17
commit
c4adff4a2d
@ -6,8 +6,10 @@ function addOldFields (feature) {
|
||||
modifiedFeature.strategies = [];
|
||||
return modifiedFeature;
|
||||
}
|
||||
modifiedFeature.strategy = feature.strategies[0].name;
|
||||
modifiedFeature.parameters = Object.assign({}, feature.strategies[0].parameters);
|
||||
if (feature.strategies[0]) {
|
||||
modifiedFeature.strategy = feature.strategies[0].name;
|
||||
modifiedFeature.parameters = Object.assign({}, feature.strategies[0].parameters);
|
||||
}
|
||||
return modifiedFeature;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user