From ac62596bef06faf82b1e065eeeb0cd7810d299a4 Mon Sep 17 00:00:00 2001
From: Simon Lecoq <22963968+lowlighter@users.noreply.github.com>
Date: Tue, 26 Apr 2022 23:55:25 +0200
Subject: [PATCH] fix(plugins/anilist): handle `null` description (#1020)
---
source/plugins/anilist/index.mjs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/source/plugins/anilist/index.mjs b/source/plugins/anilist/index.mjs
index f1e7bb01..f7cc784c 100644
--- a/source/plugins/anilist/index.mjs
+++ b/source/plugins/anilist/index.mjs
@@ -143,7 +143,7 @@ async function format({media, imports}) {
release,
genres,
progress,
- description: description.replace(/
/g, " "),
+ description: description?.replace(/
/g, " ") ?? "",
scores: {user: userScore, community: averageScore},
released: type === "ANIME" ? episodes : chapters,
artwork: await imports.imgb64(artwork),