From ced288bf0f762f8ae54df7361760b765ef703b15 Mon Sep 17 00:00:00 2001 From: suguangxu <274928232@qq.com> Date: Mon, 21 Jul 2025 16:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B2=E6=9F=93=E8=A6=86=E7=9B=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E9=97=AE=E9=A2=98=E4=BF=AE=E6=AD=A3:=201.=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=BAnull=E6=97=B6=EF=BC=8C=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E8=BF=94=E5=9B=9Enull=202.=E5=8E=BB=E6=8E=89=E5=8C=B9=E9=85=8D?= =?UTF-8?q?const?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useFormConfig.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hooks/web/useFormConfig.ts b/src/hooks/web/useFormConfig.ts index f0d5c65..e2346b1 100644 --- a/src/hooks/web/useFormConfig.ts +++ b/src/hooks/web/useFormConfig.ts @@ -117,7 +117,10 @@ export function useFormConfig() { async function queryConfig(formId:String,configName:String){ const formTemplate = await getFormTemplateUsingCache(formId); const renderConfig=formTemplate.renderConfig; - const exportMatches = renderConfig.matchAll(/export\s+const\s+(\w+)\s*(?::\s*\w+(?:\[\])?)?\s*=\s*([\s\S]*?)(?=\n\s*export\s+const|\n\s*const|\n\s*export\s+function|\n\s*function|$)/g); + if(renderConfig==null){ + return null; + } + const exportMatches = renderConfig.matchAll(/export\s+const\s+(\w+)\s*(?::\s*\w+(?:\[\])?)?\s*=\s*([\s\S]*?)(?=\n\s*export\s+const|\n\s*export\s+function|\n\s*function|$)/g); for (const match of exportMatches) { const varName = match[1]; const valueCode = match[2].trim();