Minor error fixes

This commit is contained in:
SuperChamp234 2022-01-15 09:45:50 +05:30
parent 82780ba589
commit c1851c2fc6
5 changed files with 7 additions and 4 deletions

View file

@ -3,6 +3,10 @@ import markdownitEmoji from "markdown-it-emoji"
import twemoji from "twemoji";
export default function renderMarkdown(markdown: string) {
//check if markdown is empty or not a string
if (markdown === "" || markdown === undefined) {
return "";
}
const md = new MarkdownIt({
html: true,
breaks: true,