diff --git a/x-pack/plugins/cloud_defend/public/common/utils.ts b/x-pack/plugins/cloud_defend/public/common/utils.ts index 0423a3ad44722..8200bb866db8a 100644 --- a/x-pack/plugins/cloud_defend/public/common/utils.ts +++ b/x-pack/plugins/cloud_defend/public/common/utils.ts @@ -186,7 +186,7 @@ export function validateStringValuesForCondition(condition: SelectorCondition, v const { pattern, patternError } = SelectorConditionsMap[condition]; values?.forEach((value) => { - if (value.length === 0) { + if (value?.length === 0) { errors.push( i18n.translate('xpack.cloudDefend.errorGenericEmptyValue', { defaultMessage: '"{condition}" values cannot be empty',