diff --git a/app/scripts/modules/core/src/projects/configure/Clusters.tsx b/app/scripts/modules/core/src/projects/configure/Clusters.tsx index d81d4441848..cecaf2097be 100644 --- a/app/scripts/modules/core/src/projects/configure/Clusters.tsx +++ b/app/scripts/modules/core/src/projects/configure/Clusters.tsx @@ -31,9 +31,17 @@ export class Clusters extends React.Component implements IWizard } const areStackAndDetailDisabled = this.areStackAndDetailDisabled(cluster); - errors.stack = areStackAndDetailDisabled && cluster.stack !== '*' && 'Only * is valid for the selected account'; - errors.detail = + + const stackErrors = + areStackAndDetailDisabled && cluster.stack !== '*' && 'Only * is valid for the selected account'; + if (stackErrors) { + errors.stack = stackErrors; + } + const detailErrors = areStackAndDetailDisabled && cluster.detail !== '*' && 'Only * is valid for the selected account'; + if (detailErrors) { + errors.detail = detailErrors; + } return Object.keys(errors).length ? errors : null; });