We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a44d6bc commit a1d4a36Copy full SHA for a1d4a36
packages/app/src/TeamPage.tsx
@@ -684,7 +684,7 @@ export function CreateWebhookForm({
684
onSuccess,
685
}: {
686
onClose: VoidFunction;
687
- onSuccess: (webhookId: string) => void;
+ onSuccess: (webhookId?: string) => void;
688
}) {
689
const saveWebhook = api.useSaveWebhook();
690
packages/app/src/components/Alerts.tsx
@@ -48,10 +48,12 @@ const WebhookChannelForm = <T extends object>(
48
name: props.name!,
49
});
50
51
- const handleWebhookCreated = async (webhookId: string) => {
+ const handleWebhookCreated = async (webhookId?: string) => {
52
await refetchWebhooks();
53
- field.onChange(webhookId);
54
- field.onBlur();
+ if (webhookId) {
+ field.onChange(webhookId);
55
+ field.onBlur();
56
+ }
57
close();
58
};
59
0 commit comments