mirror of https://github.com/zulip/zulip.git
message_edit: Rename variable for clarity.
This commit is contained in:
parent
c16f3c5eca
commit
dd58698c02
|
@ -1257,28 +1257,28 @@ export function edit_last_sent_message(): void {
|
||||||
return;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!msg.id) {
|
if (!last_sent_msg.id) {
|
||||||
blueslip.error("Message has invalid id in edit_last_sent_message.");
|
blueslip.error("Message has invalid id in edit_last_sent_message.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_content_editable(msg, 5)) {
|
if (!is_content_editable(last_sent_msg, 5)) {
|
||||||
return;
|
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) {
|
if (!$msg_row) {
|
||||||
// This should never happen, since we got the message above
|
// This should never happen, since we got the message above
|
||||||
// from message_lists.current.
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue