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: fix node valid detect (#21709)

Minamiyama7c76458b1811
diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx
index 2c89e722cdd..23ccea2572c 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx
+++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-picker.tsx
@@ -184,9 +184,11 @@ const VarReferencePicker: FC<Props> = ({
return startNode?.data
const node = getNodeInfoById(availableNodes, outputVarNodeId)?.data
- return {
- ...node,
- id: outputVarNodeId,
+ if (node) {
+ return {
+ ...node,
+ id: outputVarNodeId,
+ }
}
}, [value, hasValue, isConstant, isIterationVar, iterationNode, availableNodes, outputVarNodeId, startNode, isLoopVar, loopNode])