Skip to content

Commit

Permalink
fix: 修复Markdown解析器中对子元素文本的访问方式
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Feb 18, 2025
1 parent 2a65216 commit 52f77b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MarkdownEditor/editor/utils/schemaToMarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const parserNode = (node: any, preString = '', parent: any[]) => {
const code = node?.children
// @ts-ignore
.map((c) => {
return preString + c.children[0]?.text || '';
return preString + c.children?.[0]?.text || '';
})
.join('\n');
if (node.language === 'html' && node.render) {
Expand Down

1 comment on commit 52f77b3

@vercel
Copy link

@vercel vercel bot commented on 52f77b3 Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.