From 0d4e3ead71c39c844e18009320f67a5f4509118b Mon Sep 17 00:00:00 2001 From: Thamara Andrade Date: Mon, 10 May 2021 23:37:28 -0300 Subject: [PATCH] Fix balance count to account for 2-entries day (#637) --- js/time-balance.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/time-balance.js b/js/time-balance.js index 6e25df75a..0889bb748 100644 --- a/js/time-balance.js +++ b/js/time-balance.js @@ -76,7 +76,7 @@ function _getHoursPerDay() */ function _getFlexibleDayTotal(values) { - const inputsHaveExpectedSize = values.length >= 4 && values.length % 2 === 0; + const inputsHaveExpectedSize = values.length >= 2 && values.length % 2 === 0; const timesOk = values.length > 0 && values.every(time => time !== '--:--'); const hasDayEnded = inputsHaveExpectedSize && timesOk; @@ -84,7 +84,7 @@ function _getFlexibleDayTotal(values) { let dayTotal = '00:00'; let timesAreProgressing = true; - if (values.length >= 4 && values.length % 2 === 0) + if (values.length >= 2 && values.length % 2 === 0) { for (let i = 0; i < values.length; i += 2) {