Browse Source

Fixes chat when on join we receive messages.

Fixes a TypeError: Cannot set property 'innerHTML' of undefined
                    at o (Chat.js:61)
                    at Object.updateChatConversation (Chat.js:271)
that is thrown when joining a conference with messages already set to the chat. The error used to remove a strophe handler and chat was not working at all for those seeing the error.
master
damencho 8 years ago
parent
commit
2a0973a897
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      modules/UI/side_pannels/chat/Chat.js

+ 1
- 1
modules/UI/side_pannels/chat/Chat.js View File

@@ -57,7 +57,7 @@ function updateVisualNotification() {
57 57
     const unreadMsgElement
58 58
         = unreadMsgSelector.length > 0 ? unreadMsgSelector[0] : undefined;
59 59
 
60
-    if (unreadMessages) {
60
+    if (unreadMessages && unreadMsgElement) {
61 61
         unreadMsgElement.innerHTML = unreadMessages.toString();
62 62
 
63 63
         APP.store.dispatch(dockToolbox(true));

Loading…
Cancel
Save