diff --git a/app/js/messages_manager.js b/app/js/messages_manager.js index 4433a1cd..5d1c2954 100644 --- a/app/js/messages_manager.js +++ b/app/js/messages_manager.js @@ -1691,7 +1691,7 @@ angular.module('myApp.services') } function wrapForDialog (msgID, dialog) { - var useCache = dialog !== undefined; + var useCache = msgID && dialog !== undefined; var unreadCount = dialog && dialog.unread_count; if (useCache && messagesForDialogs[msgID] !== undefined) {