mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
add_to_table: bail early if there are no messages to render
This bug affected receiving messages while narrowed. When none of the messages recieved matched the narrow predicate, we'd try to render messages and then create a jQuery object out of a bunch of newlines (the only thing that results from a render of 0 messages). (imported from commit 81f5aa46fac06fe0e5a14a8757f245f90b5845cc)
This commit is contained in:
parent
57fbf21a7a
commit
dbb0241568
@ -335,6 +335,10 @@ function add_to_table(messages, table_name, filter_function, where, allow_collap
|
||||
prev = message;
|
||||
});
|
||||
|
||||
if (messages_to_render.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (current_group.length > 0)
|
||||
new_message_groups.push(current_group);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user