Browse Source

fix: workflow results in FAIL status due to null reference error (#5332)

rerorero 10 months ago
parent
commit
c7641be093
1 changed files with 1 additions and 1 deletions
  1. 1 1
      web/app/components/workflow/hooks/use-workflow-run.ts

+ 1 - 1
web/app/components/workflow/hooks/use-workflow-run.ts

@@ -179,7 +179,7 @@ export const useWorkflowRun = () => {
             setWorkflowRunningData,
           } = workflowStore.getState()
 
-          const isStringOutput = Object.keys(data.outputs).length === 1 && typeof data.outputs[Object.keys(data.outputs)[0]] === 'string'
+          const isStringOutput = data.outputs && Object.keys(data.outputs).length === 1 && typeof data.outputs[Object.keys(data.outputs)[0]] === 'string'
 
           setWorkflowRunningData(produce(workflowRunningData!, (draft) => {
             draft.result = {