1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 20:08:19 +00:00

optimize md render

This commit is contained in:
shanshuirenjia
2021-04-27 11:22:55 +08:00
parent 3cf4838f98
commit e9d1ea9ed6
2 changed files with 33 additions and 39 deletions

View File

@@ -205,7 +205,7 @@ class IndexContentViewer extends React.Component {
const textNode = linkNode.children[0];
let name = textNode ? textNode.text : '';
treeNode = new TreeNode({ name: name, href: linkNode.data.href });
} else if (paragraphNode.children[0].object === 'text') {
} else if (paragraphNode.children[0]) {
// paragraph first child node is a text node, then get node name
const textNode = paragraphNode.children[0];
let name = textNode.text ? textNode.text : '';