js: Convert vars declared separately and assigned once to const.

Because of the separate declarations, ESLint would convert them to
`let` and then trigger the `prefer-const` error.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-10-25 15:11:05 -07:00
committed by Tim Abbott
parent c3b4c0a229
commit 4d37dfcf85
12 changed files with 18 additions and 39 deletions

View File

@@ -273,13 +273,12 @@ exports.cancel = function () {
};
exports.respond_to_message = function (opts) {
var message;
var msg_type;
// Before initiating a reply to a message, if there's an
// in-progress composition, snapshot it.
drafts.update_draft();
message = current_msg_list.selected_message();
const message = current_msg_list.selected_message();
if (message === undefined) { // empty narrow implementation
if (!narrow_state.narrowed_by_pm_reply() &&