From 196a75ec0cc36b9d9b0f049421f0bf42a10efffc Mon Sep 17 00:00:00 2001 From: martmull Date: Fri, 7 Nov 2025 13:29:16 +0100 Subject: [PATCH] Fix typing error (#15699) Fix typing error --- .../workflow-executor.workspace-service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts b/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts index 24021e63f75..8dac7bfce13 100644 --- a/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts +++ b/packages/twenty-server/src/modules/workflow/workflow-executor/workspace-services/workflow-executor.workspace-service.ts @@ -195,10 +195,11 @@ export class WorkflowExecutorWorkspaceService { const isIteratorStep = isWorkflowIteratorAction(executedStep); if (isIteratorStep) { - const iteratorStepResult = - executedStepResult.result as WorkflowIteratorResult; + const iteratorStepResult = executedStepResult.result as + | WorkflowIteratorResult + | undefined; - if (!iteratorStepResult.hasProcessedAllItems) { + if (!iteratorStepResult?.hasProcessedAllItems) { return isString(executedStep.settings.input.initialLoopStepIds) ? JSON.parse(executedStep.settings.input.initialLoopStepIds) : executedStep.settings.input.initialLoopStepIds;