diff --git a/ui/src/main/resources/genesis/app/templates/common/variables.html b/ui/src/main/resources/genesis/app/templates/common/variables.html index ab76aa769..ef6419c0b 100755 --- a/ui/src/main/resources/genesis/app/templates/common/variables.html +++ b/ui/src/main/resources/genesis/app/templates/common/variables.html @@ -9,13 +9,19 @@ function disabled(variable, group) { var grp = variable.group; - var defaultVar = group.defVariable || ''; + var defaultVar; + if (group) { + defaultVar = group.defVariable; + } return !_.size(variable.values) && !grp || grp && variable.name !== defaultVar ? 'disabled="disabled"' : ''; } function disabledInput(variable, group) { var grp = variable.group; - var defaultVar = group.defVariable || ''; + var defaultVar; + if (group) { + defaultVar = group.defVariable; + } return grp && variable.name !== defaultVar ? 'disabled="disabled"' : '' }