mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
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:
@@ -227,7 +227,8 @@ MessageList.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_is_summarized_message: function (message) {
|
_is_summarized_message: function (message) {
|
||||||
if (message.flags === undefined) {
|
if (!feature_flags.summarize_read_while_narrowed ||
|
||||||
|
message === undefined || message.flags === undefined) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.summarize_read === 'home') {
|
if (this.summarize_read === 'home') {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ var assert = require('assert');
|
|||||||
|
|
||||||
global._ = require('third/underscore/underscore.js');
|
global._ = require('third/underscore/underscore.js');
|
||||||
global.util = require('js/util.js');
|
global.util = require('js/util.js');
|
||||||
|
global.feature_flags = {};
|
||||||
|
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user