fix: handle of markdownTextTs receives null
Some checks failed
Deploy to SFTP Server / build (push) Failing after 3m7s

This commit is contained in:
Max Richter
2025-10-22 13:37:29 +02:00
parent c914ee6719
commit 93c00e1c7e

View File

@@ -1,7 +1,8 @@
import MarkdownIt from "markdown-it";
const parser = new MarkdownIt();
export default function markdownToText(markdown: string = "<empty>"): string {
export default function markdownToText(markdown: string): string {
if(!markdown) return ''
return parser
.render(markdown)
.split("\n")