recent_conversation: Fix incorrect `if` condition.

row_focus cannot be equal to `$topic_rows.length` since it follows
0 array indexing.
This commit is contained in:
Aman Agrawal 2023-05-12 03:30:45 +00:00 committed by Tim Abbott
parent 0738dfd126
commit dd73f7272d
1 changed files with 1 additions and 1 deletions

View File

@ -768,7 +768,7 @@ function recenter_focus_if_off_screen() {
const table_wrapper_element = document.querySelector("#recent_topics_table .table_fix_head"); const table_wrapper_element = document.querySelector("#recent_topics_table .table_fix_head");
const $topic_rows = $("#recent_topics_table table tbody tr"); const $topic_rows = $("#recent_topics_table table tbody tr");
if (row_focus > $topic_rows.length) { if (row_focus >= $topic_rows.length) {
// User used a filter which reduced // User used a filter which reduced
// the number of visible rows. // the number of visible rows.
return; return;