Skip to content

Commit

Permalink
Fixes #37951 - Appropriate generic default value for the UI
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanshekar committed Nov 20, 2024
1 parent 3f2a522 commit 0c17af1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
$scope.urlDescription = RepositoryTypesService.getAttribute($scope.repository, "url_description");
if ($scope.genericRemoteOptions && $scope.genericRemoteOptions !== []) {
$scope.genericRemoteOptions.forEach(function(option) {
option.value = "";
option.value = option.default ?? "";
});
}
});
Expand Down Expand Up @@ -158,7 +158,7 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',

if ($scope.genericRemoteOptions && $scope.genericRemoteOptions !== []) {
$scope.genericRemoteOptions.forEach(function(option) {
if (option.type === "Array" && option.value !== "") {
if (option.type === "Array" && option.value !== "" && !Array.isArray(option.value)) {
repository[option.name] = option.value.split(option.delimiter);
} else {
repository[option.name] = option.value;
Expand Down

0 comments on commit 0c17af1

Please sign in to comment.