fix: handle parsing pure plain text

This commit is contained in:
Daniel Roe 2023-01-16 20:41:37 +00:00
parent c4c15cf1c2
commit 80da856402
3 changed files with 11 additions and 1 deletions

View file

@ -451,7 +451,7 @@ function transformCollapseMentions() {
}
return (node: Node, root: Node): Node | Node[] => {
if (processed || node.parent !== root)
if (processed || node.parent !== root || !node.children)
return node
const metions: (Node | undefined)[] = []
const children = node.children as Node[]