From 868e4b8ad64e984961898ee5e61a20984bd08400 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Mon, 2 Apr 2018 16:02:12 -0400 Subject: [PATCH] Fixed MATTERMOST-MOBILE-ANDROID-85 (#1565) --- app/components/markdown/markdown.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');