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.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix: nodeExtraData might be undefined (#21856)
crazywoola21e68b9cf146
diff --git a/web/app/components/workflow/hooks/use-nodes-data.ts b/web/app/components/workflow/hooks/use-nodes-data.tsindex aeb45ddb934..7df6b2ffd00 100644--- a/web/app/components/workflow/hooks/use-nodes-data.ts+++ b/web/app/components/workflow/hooks/use-nodes-data.ts@@ -34,15 +34,14 @@ export const useNodesExtraData = () => {export const useAvailableBlocks = (nodeType?: BlockEnum, isInIteration?: boolean, isInLoop?: boolean) => {const nodesExtraData = useNodesExtraData()const availablePrevBlocks = useMemo(() => {- if (!nodeType)+ if (!nodeType || !nodesExtraData[nodeType])return []return nodesExtraData[nodeType].availablePrevNodes || []}, [nodeType, nodesExtraData])const availableNextBlocks = useMemo(() => {- if (!nodeType)+ if (!nodeType || !nodesExtraData[nodeType])return []-return nodesExtraData[nodeType].availableNextNodes || []}, [nodeType, nodesExtraData])@@ -55,10 +54,7 @@ export const useAvailableBlocks = (nodeType?: BlockEnum, isInIteration?: booleanif (isInLoop && (nType === BlockEnum.Iteration || nType === BlockEnum.Loop || nType === BlockEnum.End))return false- if (!isInLoop && nType === BlockEnum.LoopEnd)- return false-- return true+ return !(!isInLoop && nType === BlockEnum.LoopEnd)}),availableNextBlocks: availableNextBlocks.filter((nType) => {if (isInIteration && (nType === BlockEnum.Iteration || nType === BlockEnum.Loop || nType === BlockEnum.End))@@ -67,10 +63,7 @@ export const useAvailableBlocks = (nodeType?: BlockEnum, isInIteration?: booleanif (isInLoop && (nType === BlockEnum.Iteration || nType === BlockEnum.Loop || nType === BlockEnum.End))return false- if (!isInLoop && nType === BlockEnum.LoopEnd)- return false-- return true+ return !(!isInLoop && nType === BlockEnum.LoopEnd)}),}}, [isInIteration, availablePrevBlocks, availableNextBlocks, isInLoop])