From 0c37d7b3ee512d45018eaf72eba194aa79b2c3db Mon Sep 17 00:00:00 2001 From: vytenisstaugaitis <30520456+vytenisstaugaitis@users.noreply.github.com> Date: Thu, 9 Oct 2025 11:27:07 +0300 Subject: [PATCH] fix(notifications): prevent blank email field on dialog reopen --- .../dashboard/settings/notifications/handle-notifications.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx b/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx index 325383069..f43ba51ca 100644 --- a/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx +++ b/apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx @@ -208,10 +208,10 @@ export const HandleNotifications = ({ notificationId }: Props) => { }); useEffect(() => { - if (type === "email") { + if (type === "email" && fields.length === 0) { append(""); } - }, [type, append]); + }, [type, append, fields.length]); useEffect(() => { if (notification) {