mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 12:12:55 -06:00
fix: guard applyFormatting
This commit is contained in:
parent
39606240da
commit
f5f423eb74
@ -197,6 +197,9 @@ export class TypebotService extends BaseChatbotService<TypebotModel, any> {
|
|||||||
* Apply rich text formatting for TypeBot messages
|
* Apply rich text formatting for TypeBot messages
|
||||||
*/
|
*/
|
||||||
private applyFormatting(element: any): string {
|
private applyFormatting(element: any): string {
|
||||||
|
if (typeof element === 'string') return element;
|
||||||
|
if (!element) return '';
|
||||||
|
|
||||||
let text = '';
|
let text = '';
|
||||||
|
|
||||||
if (element.text) {
|
if (element.text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user