diff --git a/src/components/Topbar.jsx b/src/components/Topbar.jsx index 3ff0f5b..11defbe 100644 --- a/src/components/Topbar.jsx +++ b/src/components/Topbar.jsx @@ -10,7 +10,10 @@ import { MystState } from "../mystState"; import { useComputed } from "@preact/signals"; const renderMdLinks = (title) => - [...title.matchAll(/\[(.+)\]\(([^\s]+)\)/g)].reduce((prev, match) => prev.replace(match[0], `${match[1]}`), title); + [...(title || "").matchAll(/\[(.+)\]\(([^\s]+)\)/g)].reduce( + (prev, match) => prev.replace(match[0], `${match[1]}`), + title, + ); const Topbar = styled.div` z-index: 10;