From c0759c35ca5131459247bb52adafd28fcd5f96df Mon Sep 17 00:00:00 2001 From: Dmitrii Arnautov Date: Thu, 1 Oct 2020 16:05:03 +0200 Subject: [PATCH] [ML] fix types --- .../annotations/annotation_description_list/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/ml/public/application/components/annotations/annotation_description_list/index.tsx b/x-pack/plugins/ml/public/application/components/annotations/annotation_description_list/index.tsx index 403d836dd9c67..156ad72ba9f9f 100644 --- a/x-pack/plugins/ml/public/application/components/annotations/annotation_description_list/index.tsx +++ b/x-pack/plugins/ml/public/application/components/annotations/annotation_description_list/index.tsx @@ -61,7 +61,7 @@ export const AnnotationDescriptionList = ({ annotation, detectorDescription }: P defaultMessage: 'Created by', } ), - description: annotation.create_username, + description: annotation.create_username ?? '', }); listItems.push({ title: i18n.translate( @@ -79,7 +79,7 @@ export const AnnotationDescriptionList = ({ annotation, detectorDescription }: P defaultMessage: 'Modified by', } ), - description: annotation.modified_username, + description: annotation.modified_username ?? '', }); } if (detectorDescription !== undefined) { @@ -94,19 +94,19 @@ export const AnnotationDescriptionList = ({ annotation, detectorDescription }: P if (annotation.partition_field_name !== undefined) { listItems.push({ title: annotation.partition_field_name, - description: annotation.partition_field_value, + description: annotation.partition_field_value ?? '', }); } if (annotation.over_field_name !== undefined) { listItems.push({ title: annotation.over_field_name, - description: annotation.over_field_value, + description: annotation.over_field_value ?? '', }); } if (annotation.by_field_name !== undefined) { listItems.push({ title: annotation.by_field_name, - description: annotation.by_field_value, + description: annotation.by_field_value ?? '', }); }