Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: workflow http node (#20262)

zxhlyhb12c28a98429
diff --git a/web/app/components/workflow/nodes/http/use-config.ts b/web/app/components/workflow/nodes/http/use-config.ts
index 68c0a89fe75..73c84c369f3 100644
--- a/web/app/components/workflow/nodes/http/use-config.ts
+++ b/web/app/components/workflow/nodes/http/use-config.ts
@@ -42,6 +42,12 @@ const useConfig = (id: string, payload: HttpNodeType) => {
data: transformToBodyPayload(bodyData, [BodyType.formData, BodyType.xWwwFormUrlencoded].includes(newInputs.body.type)),
}
}
+ else if (!bodyData) {
+ newInputs.body = {
+ ...newInputs.body,
+ data: [],
+ }
+ }
setInputs(newInputs)
setIsDataReady(true)
@@ -151,7 +157,7 @@ const useConfig = (id: string, payload: HttpNodeType) => {
inputs.url,
inputs.headers,
inputs.params,
- typeof inputs.body.data === 'string' ? inputs.body.data : inputs.body.data.map(item => item.value).join(''),
+ typeof inputs.body.data === 'string' ? inputs.body.data : inputs.body.data?.map(item => item.value).join(''),
fileVarInputs,
])