diff --git a/static/js/message_list.js b/static/js/message_list.js index bb9d2c4d6455b..981ae5463b1a4 100644 --- a/static/js/message_list.js +++ b/static/js/message_list.js @@ -218,6 +218,11 @@ MessageList.prototype = { if (closest === items.length || (closest !== 0 + // We have the index at which a message with the + // given id would be inserted, but that isn't + // necessarily the index of the message that has an + // id that is closest to the query; it could be the + // previous message in the list. && (id - items[closest - 1].id < items[closest].id - id))) {