mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +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 = [];
|
modifiedFeature.strategies = [];
|
||||||
return modifiedFeature;
|
return modifiedFeature;
|
||||||
}
|
}
|
||||||
modifiedFeature.strategy = feature.strategies[0].name;
|
if (feature.strategies[0]) {
|
||||||
modifiedFeature.parameters = Object.assign({}, feature.strategies[0].parameters);
|
modifiedFeature.strategy = feature.strategies[0].name;
|
||||||
|
modifiedFeature.parameters = Object.assign({}, feature.strategies[0].parameters);
|
||||||
|
}
|
||||||
return modifiedFeature;
|
return modifiedFeature;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user