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: import workflow errors (#6937)

crazywoola79715345ef1c
diff --git a/web/app/components/workflow/nodes/_base/components/variable/utils.ts b/web/app/components/workflow/nodes/_base/components/variable/utils.ts
index 07c9a13dacc..d507af5d8d3 100644
--- a/web/app/components/workflow/nodes/_base/components/variable/utils.ts
+++ b/web/app/components/workflow/nodes/_base/components/variable/utils.ts
@@ -404,12 +404,12 @@ export const getVarType = ({
else {
(valueSelector as ValueSelector).slice(1).forEach((key, i) => {
const isLast = i === valueSelector.length - 2
- curr = curr.find((v: any) => v.variable === key)
+ curr = curr?.find((v: any) => v.variable === key)
if (isLast) {
type = curr?.type
}
else {
- if (curr.type === VarType.object)
+ if (curr?.type === VarType.object)
curr = curr.children
}
})