eslint: Enable prefer-arrow-callback.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-07-01 16:45:54 -07:00
committed by Tim Abbott
parent 960174408f
commit a79322bc94
160 changed files with 873 additions and 1012 deletions

View File

@@ -115,9 +115,7 @@ exports.update_attachments = function (event) {
return;
}
if (event.op === 'remove' || event.op === 'update') {
attachments = attachments.filter(function (a) {
return a.id !== event.attachment.id;
});
attachments = attachments.filter((a) => a.id !== event.attachment.id);
}
if (event.op === 'add' || event.op === 'update') {
format_attachment_data([event.attachment]);
@@ -135,7 +133,7 @@ exports.set_up_attachments = function () {
const status = $('#delete-upload-status');
loading.make_indicator($('#attachments_loading_indicator'), {text: 'Loading...'});
$('#uploaded_files_table').on('click', '.remove-attachment', function (e) {
$('#uploaded_files_table').on('click', '.remove-attachment', (e) => {
delete_attachments($(e.target).closest(".uploaded_file_row").attr('data-attachment-id'));
});