diff options
Diffstat (limited to 'src/Result.jsx')
-rw-r--r-- | src/Result.jsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Result.jsx b/src/Result.jsx index e361fc7..dbb5507 100644 --- a/src/Result.jsx +++ b/src/Result.jsx @@ -87,7 +87,8 @@ function calculatePerDay(entry, baseSalary) { const segmentedDuration = segmentTime(overtimeDuration, segmentPattern); const usedMap = weekendDay(entry.date) ? multiplierMap.holidays : multiplierMap.workDays; for (let i = 0; i < segmentedDuration.length; i++) { - multiplier += segmentedDuration[i] * usedMap[i]; + if (segmentedDuration[i]) + multiplier += segmentedDuration[i] * usedMap[i]; } return multiplier * hourlyPay; |