From 1a541bc288fa6d207131144ebe3bebe628accd9a Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 1 Apr 2023 18:26:09 +0000 Subject: [PATCH] refactor: Remove unnecessary call to .bind() The bind() method is used to create functions with specific `this` values and, optionally, binds arguments to specific values. When used to specify the value of `this`, it's important that the function actually uses `this` in its function body. --- gallery/static/js/lable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery/static/js/lable.js b/gallery/static/js/lable.js index 4188422..b86161f 100644 --- a/gallery/static/js/lable.js +++ b/gallery/static/js/lable.js @@ -14,7 +14,7 @@ document.addEventListener('DOMContentLoaded', function() { setTimeout(function() { label.style.opacity = 1; - }.bind(this), 250); + }, 250); }); labels[i].addEventListener('mouseout', function() {