diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx index b41da8dcdb..3fa7ac48c8 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCode.tsx @@ -133,7 +133,7 @@ export const WorkflowEditActionCode = ({ const [functionInput, setFunctionInput] = useState( - action.settings.input.logicFunctionInput, + action.settings.input.logicFunctionInput ?? {}, ); const handleUpdateFunctionInputSchema = useDebouncedCallback( diff --git a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx index 45064647c6..c423eacbce 100644 --- a/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx +++ b/packages/twenty-front/src/modules/workflow/workflow-steps/workflow-actions/code-action/components/WorkflowEditActionCodeFields.tsx @@ -38,7 +38,7 @@ export const WorkflowEditActionCodeFields = ({ }: WorkflowEditActionCodeFieldsProps) => { return ( - {Object.entries(functionInput).map(([inputKey, inputValue]) => { + {Object.entries(functionInput ?? {}).map(([inputKey, inputValue]) => { const currentPath = [...path, inputKey]; const pathKey = currentPath.join('.');