[FIX] Cannot read property 'render' of undefined on markdown (#4549)

This commit is contained in:
Reinaldo Neto 2022-09-28 17:06:43 -03:00 committed by Diego Mello
parent b60577d8ee
commit 0974bbe6ff
1 changed files with 1 additions and 1 deletions

View File

@ -350,7 +350,7 @@ class Markdown extends PureComponent<IMarkdownProps, any> {
let ast = parser.parse(m); let ast = parser.parse(m);
ast = mergeTextNodes(ast); ast = mergeTextNodes(ast);
this.isMessageContainsOnlyEmoji = isOnlyEmoji(m) && emojiCount(m) <= 3; this.isMessageContainsOnlyEmoji = isOnlyEmoji(m) && emojiCount(m) <= 3;
return this.renderer.render(ast); return this.renderer?.render(ast) || null;
} }
} }