From dd079733fd16cfd182c97219af10c46336d0f910 Mon Sep 17 00:00:00 2001
From: Florian Orben <florian.orben@gmail.com>
Date: Tue, 1 Dec 2015 18:43:08 +0100
Subject: PLT-1182: "Recent Mention" search brings up username as
 "[username]undefined"

---
 web/react/utils/text_formatting.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/utils/text_formatting.jsx')

diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx
index 3a912fd75..f0bd46f9d 100644
--- a/web/react/utils/text_formatting.jsx
+++ b/web/react/utils/text_formatting.jsx
@@ -188,7 +188,7 @@ function highlightCurrentMentions(text, tokens) {
             const newAlias = `MM_SELFMENTION${index}`;
 
             newTokens.set(newAlias, {
-                value: `<span class='mention-highlight'>${alias}</span>` + token.extraText,
+                value: `<span class='mention-highlight'>${alias}</span>` + (token.extraText || ''),
                 originalText: token.originalText
             });
             output = output.replace(alias, newAlias);
-- 
cgit v1.2.3-1-g7c22

