mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
recent_topics: Handle no rows case on r keypress.
When there are no rows for user to reply on `r` keypress, we open compose box with everything empty.
This commit is contained in:
@@ -154,6 +154,10 @@ export function get_focused_row_message() {
|
||||
if (is_table_focused()) {
|
||||
const recent_topic_id_prefix_len = "recent_topic:".length;
|
||||
const topic_rows = $("#recent_topics_table table tbody tr");
|
||||
if (topic_rows.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const topic_row = topic_rows.eq(row_focus);
|
||||
const topic_id = topic_row.attr("id").slice(recent_topic_id_prefix_len);
|
||||
const topic_last_msg_id = topics.get(topic_id).last_msg_id;
|
||||
|
||||
Reference in New Issue
Block a user