summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-07-17 15:41:55 -0800
committer=Corey Hulen <corey@hulen.com>2015-07-17 15:41:55 -0800
commit876ad10f6f14579336a89c36b4937311326149d4 (patch)
treed531b0ad5b68afc55eb4b11a533ba1743ef2d9c2 /web/react
parentd65f199e12b19676bfac5e315ee634a8d3f05b88 (diff)
downloadchat-876ad10f6f14579336a89c36b4937311326149d4.tar.gz
chat-876ad10f6f14579336a89c36b4937311326149d4.tar.bz2
chat-876ad10f6f14579336a89c36b4937311326149d4.zip
Fixes javascript console errors
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/mention_list.jsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/react/components/mention_list.jsx b/web/react/components/mention_list.jsx
index 524f1b337..7e939812d 100644
--- a/web/react/components/mention_list.jsx
+++ b/web/react/components/mention_list.jsx
@@ -188,8 +188,8 @@ module.exports = React.createClass({
for (var i = 0; i < users.length && index < MAX_ITEMS_IN_LIST; i++) {
if (this.alreadyMentioned(users[i].username)) continue;
- if (users[i].first_name.lastIndexOf(mentionText,0) === 0
- || users[i].last_name.lastIndexOf(mentionText,0) === 0 || users[i].username.lastIndexOf(mentionText,0) === 0) {
+ if ((users[i].first_name && users[i].first_name.lastIndexOf(mentionText,0) === 0)
+ || (users[i].last_name && users[i].last_name.lastIndexOf(mentionText,0) === 0) || users[i].username.lastIndexOf(mentionText,0) === 0) {
mentions[index] = (
<Mention
ref={'mention' + index}