Skip to content

Commit

Permalink
Update zendesk.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nickscamara committed Mar 19, 2024
1 parent 4c2a195 commit 3879c61
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/providers/Zendesk/zendesk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 3879c61

Please sign in to comment.