From ce77c484758b1be28a0f29b3f68e1a04081d7919 Mon Sep 17 00:00:00 2001 From: Gabriel Medeiros Coelho Date: Sat, 31 Oct 2020 21:56:23 -0300 Subject: [PATCH] remove unnecessary conditional if animationState evaluates to -1 or 0, it would end up in a conditional that assign its value to itself. Since this is redundant, it is better to remove this conditional, to avoid an extra check --- src/static/js/pad_utils.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js index d200420e6..a2c1472d3 100644 --- a/src/static/js/pad_utils.js +++ b/src/static/js/pad_utils.js @@ -308,11 +308,7 @@ var padutils = { { animationState = -1; } - else if (animationState <= 0) - { - animationState = animationState; - } - else + else if (animationState > 0) { animationState = Math.max(-1, Math.min(0, -animationState)); }