From edf8ce57de2870448f8a260025c7430a7975cc99 Mon Sep 17 00:00:00 2001 From: heheer <1239331448@qq.com> Date: Fri, 30 Jun 2023 17:53:16 +0800 Subject: [PATCH] fix(web): fix rendering issues when custom domain not exist --- .../pages/app/functions/mods/EditorPanel/EditDomain.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/pages/app/functions/mods/EditorPanel/EditDomain.tsx b/web/src/pages/app/functions/mods/EditorPanel/EditDomain.tsx index e78d516018..ad476d1521 100644 --- a/web/src/pages/app/functions/mods/EditorPanel/EditDomain.tsx +++ b/web/src/pages/app/functions/mods/EditorPanel/EditDomain.tsx @@ -31,7 +31,7 @@ export default function EditDomain(props: { children: any }) { const { currentApp, showSuccess, setCurrentApp } = useGlobalStore(); const { register, handleSubmit, reset } = useForm<{ domain: string }>({ - defaultValues: { domain: currentApp?.domain.customDomain || "" }, + defaultValues: { domain: currentApp?.domain?.customDomain || "" }, }); const bindDomainMutation = useBindDomainMutation(); @@ -43,7 +43,7 @@ export default function EditDomain(props: { children: any }) { {React.cloneElement(children, { onClick: (event?: any) => { event?.preventDefault(); - reset({ domain: currentApp?.domain.customDomain || "" }); + reset({ domain: currentApp?.domain?.customDomain || "" }); onOpen(); }, })} @@ -58,10 +58,10 @@ export default function EditDomain(props: { children: any }) { CNAME - + + } />