Fix ts error resolve rich text (#16688)

As title
This commit is contained in:
Thomas Trompette
2025-12-18 18:00:42 +01:00
committed by GitHub
parent 4fd79e0c38
commit 79a03b8041
3 changed files with 4 additions and 7 deletions
@@ -268,7 +268,7 @@ export const WorkflowEditActionUpsertRecord = ({
<FormSingleRecordPicker
key="id"
testId="workflow-upsert-record-id"
label="Record (ID)"
label={t`Record (ID)`}
onChange={(recordId) => {
handleFieldChange('id', recordId);
}}
@@ -53,10 +53,7 @@ export class ToolExecutorWorkflowAction implements WorkflowAction {
if (sendEmailInput.body) {
toolInput = {
...sendEmailInput,
body: resolveRichTextVariables(
sendEmailInput.body,
context,
),
body: resolveRichTextVariables(sendEmailInput.body, context),
};
}
}
@@ -31,9 +31,9 @@ const buildTextNodesWithLineBreaks = (text: string): string => {
export const resolveRichTextVariables = (
input: string | null | undefined,
context: Record<string, unknown>,
): string | null | undefined => {
): string | undefined => {
if (!isDefined(input)) {
return input;
return undefined;
}
return input.replace(