diff --git a/src/plugins/data_source_management/public/components/utils.ts b/src/plugins/data_source_management/public/components/utils.ts index 0768a35f135e..eebf7316e3e3 100644 --- a/src/plugins/data_source_management/public/components/utils.ts +++ b/src/plugins/data_source_management/public/components/utils.ts @@ -110,18 +110,20 @@ export function getDefaultDataSource( label: defaultOption?.[0]?.label || defaultOptionDataSource.attributes?.title, }, ]; - } else if (defaultDataSourceAfterCheck) { +} +if (defaultDataSourceAfterCheck) { return [ { id: defaultDataSourceAfterCheck.id, label: defaultDataSourceAfterCheck.attributes?.title || '', }, ]; - } else if (!hideLocalCluster) { + } + if (!hideLocalCluster) { return [LocalCluster]; - } else { + } return []; - } + } export async function getDataSourceById(