diff --git a/public/js/app/number-animator.js b/public/js/app/number-animator.js index 69b16fef..bf5b3d77 100644 --- a/public/js/app/number-animator.js +++ b/public/js/app/number-animator.js @@ -21,8 +21,11 @@ function animate(element, end, duration = 500, fixtotwo = false) { // Calculate current value and round to integer const currentCount = Math.round(end * easedProgress * 100) / 100; - if (fixtotwo) element.innerHTML = currentCount.toFixed(2); - else element.innerHTML = currentCount; + if (fixtotwo) { + element.innerHTML = currentCount.toFixed(2); + } else { + element.innerHTML = currentCount; + } if (progress < 1) { requestAnimationFrame(updateCount);