Skip to content

Commit a545ffc

Browse files
fix data source picker for alerts card (#1149) (#1151)
(cherry picked from commit 20b50b5) Signed-off-by: Joanne Wang <jowg@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ea3b164 commit a545ffc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/components/DataSourceAlertsCard/DataSourceAlertsCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const DataSourceAlertsCard: React.FC<DataSourceAlertsCardProps> = ({ get
4949
}, [dataSource]);
5050

5151
const onDataSourceSelected = useCallback((options: any[]) => {
52-
if (dataSource?.id !== undefined && dataSource?.id !== options[0]?.id) {
52+
if (dataSource?.id === undefined || dataSource?.id !== options[0]?.id) {
5353
setDataSource(options[0]);
5454
}
5555
}, [dataSource]);

0 commit comments

Comments
 (0)