From 8258475a63a5e7490aae68cebc219ead30f42881 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 20 Mar 2022 14:51:36 +0100 Subject: [PATCH] Fixed bug if markdawn content empty --- src/components/Markdown/Markdawn.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Markdown/Markdawn.tsx b/src/components/Markdown/Markdawn.tsx index 83f743b..36e8e1f 100644 --- a/src/components/Markdown/Markdawn.tsx +++ b/src/components/Markdown/Markdawn.tsx @@ -338,6 +338,8 @@ function HeaderToolTip(props: { id: string }) { } export function preprocessMarkDawn(text: string): string { + if (!text) return ""; + let scenebreakIndex = 0; const visitedSlugs: string[] = [];