[FIX] Mentions crashing without username (#2374)

This commit is contained in:
Diego Mello 2020-08-05 13:48:03 -03:00 committed by GitHub
parent cc0d143534
commit 3fb253b3de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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