From 3fb253b3de879432e3bfeb62b4debf89d52ecdc9 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Wed, 5 Aug 2020 13:48:03 -0300 Subject: [PATCH] [FIX] Mentions crashing without username (#2374) --- app/containers/markdown/AtMention.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/containers/markdown/AtMention.js b/app/containers/markdown/AtMention.js index 580b9b16..56b2a0a9 100644 --- a/app/containers/markdown/AtMention.js +++ b/app/containers/markdown/AtMention.js @@ -39,7 +39,7 @@ const AtMention = React.memo(({ }; } - const user = mentions && mentions.length && mentions.find(m => m.username === mention); + const user = mentions?.find?.(m => m && m.username === mention); const handlePress = () => { logEvent(events.ROOM_MENTION_GO_USER_INFO);