Merge pull request #7981 from jfsiebel/fix-pop-up-clear-chat-problem

Fix problem with clear chat when popup alerts are enabled
This commit is contained in:
Anton Georgiev 2019-08-23 17:23:13 -04:00 committed by GitHub
commit c41a3030d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ class ChatAlert extends PureComponent {
const reducedMessage = Service
.reduceAndMapGroupMessages(pendingNotificationsByChat[chatId].slice(-5)).pop();
if (!reducedMessage) return null;
if (!reducedMessage || !reducedMessage.sender) return null;
const content = this
.createMessage(reducedMessage.sender.name, reducedMessage.content);