mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +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);
|
var closest = this._lower_bound(id);
|
||||||
|
|
||||||
if (id === items[closest].id) {
|
if (closest < items.length && id === items[closest].id) {
|
||||||
return items[closest].id;
|
return items[closest].id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user