From 2a0973a8979b72cdb0f26fb68e0dcaabae29b81e Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 25 May 2017 14:10:56 -0500 Subject: [PATCH] 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. --- modules/UI/side_pannels/chat/Chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/UI/side_pannels/chat/Chat.js b/modules/UI/side_pannels/chat/Chat.js index f8fdcb5ac..d2556fa66 100644 --- a/modules/UI/side_pannels/chat/Chat.js +++ b/modules/UI/side_pannels/chat/Chat.js @@ -57,7 +57,7 @@ function updateVisualNotification() { const unreadMsgElement = unreadMsgSelector.length > 0 ? unreadMsgSelector[0] : undefined; - if (unreadMessages) { + if (unreadMessages && unreadMsgElement) { unreadMsgElement.innerHTML = unreadMessages.toString(); APP.store.dispatch(dockToolbox(true));