mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
message_fetch: opts.msg_list can be undefined.
See also 69e10b4dae.
Even though opts.msg_list can be undefined, we still want to retry
loading messages for it since our code needs that data regardless
of opts.msg_list being undefined.
This commit is contained in:
committed by
Tim Abbott
parent
cd48ee2152
commit
9f0008372c
@@ -326,9 +326,14 @@ export function load_messages(opts, attempt = 1) {
|
||||
ui_report.hide_error($("#connection-error"));
|
||||
}
|
||||
|
||||
if (opts.msg_list.narrowed && opts.msg_list !== message_lists.current) {
|
||||
// We unnarrowed before getting an error so don't
|
||||
// bother trying again or doing further processing.
|
||||
if (
|
||||
opts.msg_list !== undefined &&
|
||||
opts.msg_list !== message_lists.current &&
|
||||
opts.msg_list.narrowed
|
||||
) {
|
||||
// This fetch was for a narrow, and we unnarrowed
|
||||
// before getting an error, so don't bother trying
|
||||
// again or doing further processing.
|
||||
return;
|
||||
}
|
||||
if (xhr.status === 400) {
|
||||
|
||||
Reference in New Issue
Block a user