From f5f423eb74a4bea4a934d6297362eec2b1019827 Mon Sep 17 00:00:00 2001 From: JrStarkmidia <37372590+JrStarkmidia@users.noreply.github.com> Date: Thu, 26 Jun 2025 20:03:59 -0300 Subject: [PATCH] fix: guard applyFormatting --- .../integrations/chatbot/typebot/services/typebot.service.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api/integrations/chatbot/typebot/services/typebot.service.ts b/src/api/integrations/chatbot/typebot/services/typebot.service.ts index 01346fa6..5cf35c32 100644 --- a/src/api/integrations/chatbot/typebot/services/typebot.service.ts +++ b/src/api/integrations/chatbot/typebot/services/typebot.service.ts @@ -197,6 +197,9 @@ export class TypebotService extends BaseChatbotService { * Apply rich text formatting for TypeBot messages */ private applyFormatting(element: any): string { + if (typeof element === 'string') return element; + if (!element) return ''; + let text = ''; if (element.text) {