Fixed MATTERMOST-MOBILE-ANDROID-85 (#1565)

This commit is contained in:
Harrison Healey
2018-04-02 16:02:12 -04:00
committed by Elias Nahum
parent 097244692c
commit 868e4b8ad6

View File

@@ -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');