diff --git a/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx b/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx index 5ca173ff4dae7..da0919bd0ce8e 100644 --- a/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx +++ b/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx @@ -40,7 +40,7 @@ export function DataViewsList({ singleSelection="always" options={dataViewsList?.map(({ title, id, name }) => ({ key: id, - label: name ?? title, + label: name ? name : title, value: id, checked: id === currentDataViewId ? 'on' : undefined, }))} diff --git a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/combo_box_select.tsx b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/combo_box_select.tsx index fb3a24681e1ba..eca39f6261eea 100644 --- a/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/combo_box_select.tsx +++ b/src/plugins/vis_types/timeseries/public/application/components/lib/index_pattern_select/combo_box_select.tsx @@ -24,7 +24,7 @@ type IdsWithTitle = Awaited>; type SelectedOptions = EuiComboBoxProps['selectedOptions']; const toComboBoxOptions = (options: IdsWithTitle) => - options.map(({ name, title, id }) => ({ label: name ?? title, id })); + options.map(({ name, title, id }) => ({ label: name ? name : title, id })); export const ComboBoxSelect = ({ fetchedIndex, diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts b/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts index b059336d2e739..d6acf5958bd2b 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/loader.ts @@ -85,7 +85,7 @@ export function convertDataViewIntoLensIndexPattern(dataView: DataView): IndexPa return { id: dataView.id!, // id exists for sure because we got index patterns by id title, - name: name ?? title, + name: name ? name : title, timeFieldName, fieldFormatMap: fieldFormatMap &&