summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-31 12:25:15 -0400
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-31 12:25:15 -0400
commit7dee877c191022560c5eb93582e02370071285fe (patch)
tree19b5ad1693183d8f11558b417e7c3b95d447746c
parent6c8116a0b812d0ef257dc53aa8cee64be92a19f6 (diff)
parent42857295504348c920bc87b855eac148bb61b066 (diff)
downloadchat-7dee877c191022560c5eb93582e02370071285fe.tar.gz
chat-7dee877c191022560c5eb93582e02370071285fe.tar.bz2
chat-7dee877c191022560c5eb93582e02370071285fe.zip
Merge pull request #2598 from mattermost/plt-2474
PLT-2474 Fixing typing message on channel switch.
-rw-r--r--webapp/components/msg_typing.jsx12
1 files changed, 7 insertions, 5 deletions
diff --git a/webapp/components/msg_typing.jsx b/webapp/components/msg_typing.jsx
index b2d414287..631eea78d 100644
--- a/webapp/components/msg_typing.jsx
+++ b/webapp/components/msg_typing.jsx
@@ -40,13 +40,15 @@ class MsgTyping extends React.Component {
}
updateTypingText(typingUsers) {
- if (!typingUsers) {
- return;
+ let text = '';
+ let users = {};
+ let numUsers = 0;
+ if (typingUsers) {
+ users = Object.keys(typingUsers);
+ numUsers = users.length;
}
- const users = Object.keys(typingUsers);
- let text = '';
- switch (users.length) {
+ switch (numUsers) {
case 0:
text = '';
break;