From cc94e6a7c07c5742938a15e6e340d3dde3de17b3 Mon Sep 17 00:00:00 2001 From: Bereket Engida Date: Mon, 30 Dec 2024 21:58:54 +0300 Subject: [PATCH] docs: fix changelogs --- docs/app/changelogs/page.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/app/changelogs/page.tsx b/docs/app/changelogs/page.tsx index ca52708f..ad3359eb 100644 --- a/docs/app/changelogs/page.tsx +++ b/docs/app/changelogs/page.tsx @@ -47,13 +47,16 @@ const ChangelogPage = async () => { const mainContent = line.split(";")[0]; const context = line.split(";")[2]; const mentions = context - .split(" ") + ?.split(" ") .filter((word) => word.startsWith("@")) .map((mention) => { const username = mention.replace("@", ""); const avatarUrl = `https://github.com/${username}.png`; return `[![${mention}](${avatarUrl})](https://github.com/${username})`; }); + if (!mentions) { + return line; + } // Remove   return mainContent.replace(/ /g, "") + " – " + mentions.join(" "); }