From c6a12735e26c170671542435c7b1071b777acd42 Mon Sep 17 00:00:00 2001 From: Karl Godard Date: Mon, 15 May 2023 18:02:19 +0000 Subject: [PATCH] another null check --- x-pack/plugins/cloud_defend/public/common/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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',