From 75c338b0f1dae5047bb101f6795dd625e0e0315e Mon Sep 17 00:00:00 2001 From: chenos Date: Sun, 19 Mar 2023 12:59:48 +0800 Subject: [PATCH] fix(markdown): empty text --- .../core/client/src/schema-component/antd/markdown/util.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/client/src/schema-component/antd/markdown/util.ts b/packages/core/client/src/schema-component/antd/markdown/util.ts index e1db7e704c..702fdb1241 100644 --- a/packages/core/client/src/schema-component/antd/markdown/util.ts +++ b/packages/core/client/src/schema-component/antd/markdown/util.ts @@ -3,6 +3,9 @@ import './highlight-theme/default.less'; import './highlight-theme/table.less'; export async function parseMarkdown(text: string) { + if (!text) { + return text; + } const m = await import('./md'); return m.default.render(text); }