Skip to content

Commit f5f423e

Browse files
committed
fix: guard applyFormatting
1 parent 3960624 commit f5f423e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/api/integrations/chatbot/typebot/services/typebot.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ export class TypebotService extends BaseChatbotService<TypebotModel, any> {
197197
* Apply rich text formatting for TypeBot messages
198198
*/
199199
private applyFormatting(element: any): string {
200+
if (typeof element === 'string') return element;
201+
if (!element) return '';
202+
200203
let text = '';
201204

202205
if (element.text) {

0 commit comments

Comments
 (0)