From dd58698c02c19e7e2e0d867bfb7c0c58b8c425e3 Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Sun, 17 Nov 2024 09:51:11 +0530 Subject: [PATCH] message_edit: Rename variable for clarity. --- web/src/message_edit.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts index fe78b813ce..be27893222 100644 --- a/web/src/message_edit.ts +++ b/web/src/message_edit.ts @@ -1257,28 +1257,28 @@ export function edit_last_sent_message(): void { return; } - const msg = message_lists.current.get_last_message_sent_by_me(); + const last_sent_msg = message_lists.current.get_last_message_sent_by_me(); - if (!msg) { + if (!last_sent_msg) { return; } - if (!msg.id) { + if (!last_sent_msg.id) { blueslip.error("Message has invalid id in edit_last_sent_message."); return; } - if (!is_content_editable(msg, 5)) { + if (!is_content_editable(last_sent_msg, 5)) { return; } - message_lists.current.select_id(msg.id, {then_scroll: true}); + message_lists.current.select_id(last_sent_msg.id, {then_scroll: true}); - const $msg_row = message_lists.current.get_row(msg.id); + const $msg_row = message_lists.current.get_row(last_sent_msg.id); if (!$msg_row) { // This should never happen, since we got the message above // from message_lists.current. - blueslip.error("Could not find row for id", {msg_id: msg.id}); + blueslip.error("Could not find row for id", {msg_id: last_sent_msg.id}); return; }