Add radix parameter to parseInt calls in DurationInput

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 21:46:20 +08:00
parent 2b5938738e
commit dd5096b10b

View File

@@ -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;