From 3d10d48425796d21088661a762dfeb3e640293cb Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 3 Aug 2025 16:40:24 -0600 Subject: [PATCH] fix(cluster-settings): ensure data validation for registryId in form defaults --- .../application/advanced/cluster/show-cluster-settings.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx index 53b241560..247fd3ebf 100644 --- a/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx +++ b/apps/dokploy/components/dashboard/application/advanced/cluster/show-cluster-settings.tsx @@ -79,7 +79,7 @@ export const ShowClusterSettings = ({ id, type }: Props) => { const form = useForm({ defaultValues: { - ...(type === "application" && "registryId" in data + ...(type === "application" && data && "registryId" in data ? { registryId: data?.registryId || "", } @@ -92,7 +92,7 @@ export const ShowClusterSettings = ({ id, type }: Props) => { useEffect(() => { if (data?.command) { form.reset({ - ...(type === "application" && "registryId" in data + ...(type === "application" && data && "registryId" in data ? { registryId: data?.registryId || "", }