mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-13 15:35:17 +00:00
fix(cluster-settings): ensure data validation for registryId in form defaults
This commit is contained in:
+2
-2
@@ -79,7 +79,7 @@ export const ShowClusterSettings = ({ id, type }: Props) => {
|
|||||||
|
|
||||||
const form = useForm<AddCommand>({
|
const form = useForm<AddCommand>({
|
||||||
defaultValues: {
|
defaultValues: {
|
||||||
...(type === "application" && "registryId" in data
|
...(type === "application" && data && "registryId" in data
|
||||||
? {
|
? {
|
||||||
registryId: data?.registryId || "",
|
registryId: data?.registryId || "",
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ export const ShowClusterSettings = ({ id, type }: Props) => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (data?.command) {
|
if (data?.command) {
|
||||||
form.reset({
|
form.reset({
|
||||||
...(type === "application" && "registryId" in data
|
...(type === "application" && data && "registryId" in data
|
||||||
? {
|
? {
|
||||||
registryId: data?.registryId || "",
|
registryId: data?.registryId || "",
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user