Skip to content

Commit

Permalink
make empty yaml check more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
hop-dev committed Jan 24, 2022
1 parent 83da7d9 commit 69ddf5c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const validatePackagePolicyConfig = (
}

if (varDef.required) {
if (parsedValue === undefined || (varDef.type === 'yaml' && !parsedValue)) {
if (parsedValue === undefined || (varDef.type === 'yaml' && parsedValue === '')) {
errors.push(
i18n.translate('xpack.fleet.packagePolicyValidation.requiredErrorMessage', {
defaultMessage: '{fieldName} is required',
Expand Down

0 comments on commit 69ddf5c

Please sign in to comment.