瀏覽代碼

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 年之前
父節點
當前提交
2a0973a897
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      modules/UI/side_pannels/chat/Chat.js

+ 1
- 1
modules/UI/side_pannels/chat/Chat.js 查看文件

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

Loading…
取消
儲存