소스 검색

fix: import workflow errors (#6937)

crazywoola 10 달 전
부모
커밋
79715345ef
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      web/app/components/workflow/nodes/_base/components/variable/utils.ts

+ 2 - 2
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
       }
     })