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.
This commit is contained in:
damencho 2017-05-25 14:10:56 -05:00 committed by Paweł Domas
parent 42b51e3c5c
commit 2a0973a897
1 changed files with 1 additions and 1 deletions

View File

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