mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
Handle case where _lower_bound returns size of input list
(imported from commit bd91512615b11935eafd5809ca414eeb0cf189c4)
This commit is contained in:
@@ -246,7 +246,7 @@ MessageList.prototype = {
|
||||
|
||||
var closest = this._lower_bound(id);
|
||||
|
||||
if (id === items[closest].id) {
|
||||
if (closest < items.length && id === items[closest].id) {
|
||||
return items[closest].id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user