mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
fix(cluster-settings): ensure data validation for registryId in form defaults
This commit is contained in:
@@ -79,7 +79,7 @@ export const ShowClusterSettings = ({ id, type }: Props) => {
|
||||
|
||||
const form = useForm<AddCommand>({
|
||||
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 || "",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user