Apply JavaScript rules to prevent shadowing

Using the same variable name makes the code more difficult to read.

We're also enabling the `no-param-reassing` rule since we accidentally
reassigned params in commit 824dd26d, and this rule will prevent us from
doing so in the future.
This commit is contained in:
Javi Martín
2019-07-03 01:57:31 +02:00
parent efc32bc764
commit 044da18af1
3 changed files with 8 additions and 6 deletions

View File

@@ -59,9 +59,9 @@
$(data.wrapper).find(".attachment-actions .action-remove").removeClass("small-3").addClass("small-12");
destroyAttachmentLink = $(data.result.destroy_link);
$(data.destroyAttachmentLinkContainer).html(destroyAttachmentLink);
$(destroyAttachmentLink).on("click", function(e) {
e.preventDefault();
e.stopPropagation();
$(destroyAttachmentLink).on("click", function(event) {
event.preventDefault();
event.stopPropagation();
App.Documentable.doDeleteCachedAttachmentRequest(this.href, data);
});
if (input["lockUpload"]) {