Skip to content

Commit

Permalink
fix(pipeline): fix invisible parameter when default is not in options (
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmquach committed Jun 18, 2019
1 parent 5c4facb commit 939d608
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ module.exports = angular
$scope.stage.pipelineParameters = {};
}
$scope.pipelineParameters = config.parameterConfig;
$scope.pipelineParameters.forEach(parameterConfig => {
if (
parameterConfig.default &&
parameterConfig.options &&
!parameterConfig.options.some(option => option.value === parameterConfig.default)
) {
parameterConfig.options.unshift({ value: parameterConfig.default });
}
});
$scope.userSuppliedParameters = $scope.stage.pipelineParameters;

if ($scope.pipelineParameters) {
Expand Down

0 comments on commit 939d608

Please sign in to comment.