diff --git a/src/components/DurationInput.vue b/src/components/DurationInput.vue index f8a3972..6cae191 100644 --- a/src/components/DurationInput.vue +++ b/src/components/DurationInput.vue @@ -295,7 +295,7 @@ function handleArrowDown(newVal, tUnit) { function incrementPreviousUnit(input) { if (input.dataset.index > 0) { const prevUnit = document.querySelector( - `input[data-index="${parseInt(input.dataset.index) - 1}"]`, + `input[data-index="${parseInt(input.dataset.index, 10) - 1}"]`, ); if (prevUnit) actionUpDown(prevUnit, true); } @@ -325,7 +325,7 @@ function updateInputValue(input, newVal, tUnit) { * @param {string} [size] - 'max' or 'min' to set boundary days. */ function secondToDate(totalSec, size) { - totalSec = parseInt(totalSec); + totalSec = parseInt(totalSec, 10); if (!isNaN(totalSec)) { seconds.value = totalSec % 60; minutes.value = (Math.floor(totalSec - seconds.value) / 60) % 60;