From 3879c6147bb38f3c6939a87e936c8c0769f30f4b Mon Sep 17 00:00:00 2001 From: Nicolas Date: Tue, 19 Mar 2024 15:02:31 -0400 Subject: [PATCH] Update zendesk.ts --- src/providers/Zendesk/zendesk.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/providers/Zendesk/zendesk.ts b/src/providers/Zendesk/zendesk.ts index 56c3dac..0c4abd1 100644 --- a/src/providers/Zendesk/zendesk.ts +++ b/src/providers/Zendesk/zendesk.ts @@ -52,8 +52,13 @@ export class ZendeskReader { for (const article of articles) { if (article.body == null) continue; - - const bodyText = parse(article.body).text; + let bodyText = article.body; + try { + bodyText = parse(article.body).text ?? article.body; + } catch (error) { + bodyText = article.body; + + } results.push({ text: bodyText, extra_info: {