Skip to content

Open-source status page, incident response and uptime monitoring

Fixed Empty data from notificaion page (#577)

Kushagra Sharma16cdc1990275
diff --git a/apps/web/src/components/forms/notification-form.tsx b/apps/web/src/components/forms/notification-form.tsx
index 5fc63c0fe..27795c89c 100644
--- a/apps/web/src/components/forms/notification-form.tsx
+++ b/apps/web/src/components/forms/notification-form.tsx
@@ -130,6 +130,10 @@ export function NotificationForm({
async function onSubmit({ provider, data, ...rest }: InsertNotification) {
startTransition(async () => {
try {
+ if (data === "") {
+ form.setError("data", { message: "This field is required" });
+ return;
+ }
if (defaultValues) {
await api.notification.update.mutate({
provider,