diff --git a/packages/unleash-api/lib/helper/legacy-feature-mapper.js b/packages/unleash-api/lib/helper/legacy-feature-mapper.js index 36d25a0659..e67b7aeba5 100644 --- a/packages/unleash-api/lib/helper/legacy-feature-mapper.js +++ b/packages/unleash-api/lib/helper/legacy-feature-mapper.js @@ -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; }