From c7641be0932ba157bb426354a9db5e2e273a08d4 Mon Sep 17 00:00:00 2001 From: rerorero Date: Tue, 18 Jun 2024 10:33:33 +0900 Subject: [PATCH] fix: workflow results in FAIL status due to null reference error (#5332) --- web/app/components/workflow/hooks/use-workflow-run.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/app/components/workflow/hooks/use-workflow-run.ts b/web/app/components/workflow/hooks/use-workflow-run.ts index f31137196f..0067b58e7f 100644 --- a/web/app/components/workflow/hooks/use-workflow-run.ts +++ b/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 = {