Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

message_fetch: Return "first_unread" as backfill anchor for empty list.

Sahil Batra146f78a83d7b
diff --git a/web/src/message_fetch.js b/web/src/message_fetch.js
index 524fb252bfb..1c9c0881743 100644
--- a/web/src/message_fetch.js
+++ b/web/src/message_fetch.js
@@ -346,9 +346,7 @@ export function get_backfill_anchor(msg_list) {
return oldest_msg.id;
}
- // msg_list is empty, which is an impossible
- // case, raise a fatal error.
- throw new Error("There are no message available to backfill.");
+ return "first_unread";
}
export function get_frontfill_anchor(msg_list) {