Skip to content

Commit 9cb0965

Browse files
committed
account for sendTo being optional
1 parent a22b28e commit 9cb0965

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/notification-picker.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export function NotificationPicker({
4141
...model,
4242
notification: {
4343
...model.notification,
44-
sendTo: model.notification?.sendTo || '',
4544
selectedEvents: updatedEvents
4645
}
4746
});
@@ -52,8 +51,8 @@ export function NotificationPicker({
5251

5352
const sendToChange = useCallback(
5453
(e: React.ChangeEvent<HTMLInputElement>) => {
55-
const { value } = e.target;
56-
const updatedNotification = { ...model.notification, sendTo: value };
54+
const { name, value } = e.target;
55+
const updatedNotification = { ...model.notification, [name]: value };
5756
modelChange({ ...model, notification: updatedNotification });
5857
},
5958
[model, modelChange]

0 commit comments

Comments
 (0)