Add defensive checks against undefined messages to _is_summarized_message.

Should fix the issue with empty realms.

(imported from commit afca70ebf3b7b74ae0d0c269c72b4f8d54fc254b)
This commit is contained in:
Kevin Mehall
2013-08-08 12:33:53 -04:00
parent aa29719bbd
commit 0b9497305f
2 changed files with 3 additions and 1 deletions

View File

@@ -227,7 +227,8 @@ MessageList.prototype = {
},
_is_summarized_message: function (message) {
if (message.flags === undefined) {
if (!feature_flags.summarize_read_while_narrowed ||
message === undefined || message.flags === undefined) {
return false;
}
if (this.summarize_read === 'home') {