From 9feeb82ba87b9a62271981753c513cee03cd7581 Mon Sep 17 00:00:00 2001 From: mizoo <55850618+mizoo-snow21@users.noreply.github.com> Date: Sat, 5 Jul 2025 11:50:57 +0900 Subject: [PATCH] Update web/app/components/base/markdown-blocks/form.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- web/app/components/base/markdown-blocks/form.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/app/components/base/markdown-blocks/form.tsx b/web/app/components/base/markdown-blocks/form.tsx index 577b546f3b..fcd790157c 100644 --- a/web/app/components/base/markdown-blocks/form.tsx +++ b/web/app/components/base/markdown-blocks/form.tsx @@ -39,11 +39,10 @@ const MarkdownForm = ({ node }: any) => { const initialValues: { [key: string]: any } = {} node.children.forEach((child: any) => { if ([SUPPORTED_TAGS.INPUT, SUPPORTED_TAGS.TEXTAREA].includes(child.tagName)) { - if (child.tagName === SUPPORTED_TAGS.INPUT && child.properties.type === SUPPORTED_TYPES.HIDDEN) { - initialValues[child.properties.name] = child.properties.value || '' - } else { - initialValues[child.properties.name] = child.properties.value - } + initialValues[child.properties.name] = + (child.tagName === SUPPORTED_TAGS.INPUT && child.properties.type === SUPPORTED_TYPES.HIDDEN) + ? (child.properties.value || '') + : child.properties.value } }) setFormValues(initialValues)