Skip to content

Commit

Permalink
fix data source picker for alerts card
Browse files Browse the repository at this point in the history
Signed-off-by: Joanne Wang <[email protected]>
  • Loading branch information
jowg-amazon committed Oct 28, 2024
1 parent ab65362 commit af9690c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const DataSourceAlertsCard: React.FC<DataSourceAlertsCardProps> = ({ 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]);
Expand Down

0 comments on commit af9690c

Please sign in to comment.