mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
condense: Skip over invalid content.
We were defending against `content` being undefined, which is impossible, instead of checking the length of the jQuery object.
This commit is contained in:
parent
5245aa457f
commit
249c19b7df
@ -178,8 +178,15 @@ exports.condense_and_collapse = function (elems) {
|
||||
|
||||
for (const elem of elems) {
|
||||
const content = $(elem).find(".message_content");
|
||||
|
||||
if (content.length !== 1) {
|
||||
// We could have a "/me did this" message or something
|
||||
// else without a `message_content` div.
|
||||
continue;
|
||||
}
|
||||
|
||||
const message = current_msg_list.get(rows.id($(elem)));
|
||||
if (content !== undefined && message !== undefined) {
|
||||
if (message !== undefined) {
|
||||
const message_height = get_message_height(elem, message.id);
|
||||
const long_message = message_height > height_cutoff;
|
||||
if (long_message) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user