Fix warning when setting description to undefined (#117338) (#117621)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: David Sánchez <davidsansol92@gmail.com>
This commit is contained in:
Kibana Machine 2021-11-05 06:33:23 -04:00 committed by GitHub
parent 6f08d6232e
commit a477d55ec0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,7 +89,7 @@ export const CriteriaConditions = memo<CriteriaConditionsProps>(
};
const getEntryOperator = (type: string, operator: string) => {
if (type === 'nested') return;
if (type === 'nested') return '';
return operator === 'included'
? OPERATOR_TYPE_LABELS_INCLUDED[type as keyof typeof OPERATOR_TYPE_LABELS_INCLUDED] ?? type
: OPERATOR_TYPE_LABELS_EXCLUDED[type as keyof typeof OPERATOR_TYPE_LABELS_EXCLUDED] ?? type;