diff --git a/app/components/markdown/markdown.js b/app/components/markdown/markdown.js index 4789d98f4..fcc4859d0 100644 --- a/app/components/markdown/markdown.js +++ b/app/components/markdown/markdown.js @@ -361,7 +361,7 @@ export default class Markdown extends PureComponent { if (this.props.isEdited) { const editIndicatorNode = new Node('edited_indicator'); - if (['heading', 'paragraph'].includes(ast.lastChild.type)) { + if (ast.lastChild && ['heading', 'paragraph'].includes(ast.lastChild.type)) { ast.lastChild.appendChild(editIndicatorNode); } else { const node = new Node('paragraph');