diff --git a/packages/twenty-front/src/modules/workflow/search-variables/utils/variableTag.ts b/packages/twenty-front/src/modules/workflow/search-variables/utils/variableTag.ts index ab8775b5d8e11..ec2361ee22754 100644 --- a/packages/twenty-front/src/modules/workflow/search-variables/utils/variableTag.ts +++ b/packages/twenty-front/src/modules/workflow/search-variables/utils/variableTag.ts @@ -1,5 +1,5 @@ import { Node } from '@tiptap/core'; -import { mergeAttributes, RawCommands } from '@tiptap/react'; +import { mergeAttributes } from '@tiptap/react'; declare module '@tiptap/core' { interface Commands { @@ -49,15 +49,16 @@ export const VariableTag = Node.create({ ]; }, - // @ts-expect-error - addCommands is missing from the NodeConfig type addCommands: () => ({ insertVariableTag: (variable: string) => - ({ commands }: { commands: Partial }) => { - return commands.insertContent?.({ + ({ commands }) => { + commands.insertContent?.({ type: 'variableTag', attrs: { variable }, }); + + return true; }, }), });