diff --git a/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx b/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx index 00b2e395..77f9089c 100644 --- a/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx +++ b/public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx @@ -49,7 +49,7 @@ export const DataSourceAlertsCard: React.FC = ({ get }, [dataSource]); const onDataSourceSelected = useCallback((options: any[]) => { - if (dataSource?.id !== undefined && dataSource?.id !== options[0]?.id) { + if (dataSource?.id === undefined || dataSource?.id !== options[0]?.id) { setDataSource(options[0]); } }, [dataSource]);