fix: guard applyFormatting

This commit is contained in:
JrStarkmidia 2025-06-26 20:03:59 -03:00
parent 39606240da
commit f5f423eb74

View File

@ -197,6 +197,9 @@ export class TypebotService extends BaseChatbotService<TypebotModel, any> {
* 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) {