From 0974bbe6ff1a3502de2ba83d8756281fac8470a3 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:06:43 -0300 Subject: [PATCH] [FIX] Cannot read property 'render' of undefined on markdown (#4549) --- app/containers/markdown/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/containers/markdown/index.tsx b/app/containers/markdown/index.tsx index 1fd04eb36..9a58bb5ab 100644 --- a/app/containers/markdown/index.tsx +++ b/app/containers/markdown/index.tsx @@ -350,7 +350,7 @@ class Markdown extends PureComponent { let ast = parser.parse(m); ast = mergeTextNodes(ast); this.isMessageContainsOnlyEmoji = isOnlyEmoji(m) && emojiCount(m) <= 3; - return this.renderer.render(ast); + return this.renderer?.render(ast) || null; } }