Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
fisjac committed May 9, 2024
1 parent fa2083d commit 10fb0a3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions superset-frontend/src/features/alerts/AlertReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
index: number,
setting: NotificationSetting,
) => {
const settings: NotificationSetting[] = [...notificationSettings];
settings[index] = setting;

// if you've changed notification method -> reset recipients
if (notificationSettings[index].method !== setting.method) {
notificationSettings[index] = setting;
Expand All @@ -569,10 +572,7 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
setNotificationAddState('active');
}
} else {
// if notification method has not changed -> update
const settings: NotificationSetting[] = [...notificationSettings];
settings[index] = setting;
setNotificationSettings(settings)
setNotificationSettings(settings);
}
};

Expand Down

0 comments on commit 10fb0a3

Please sign in to comment.