From dd5096b10b1fa1a340b3cfc0c7f79262992c70a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 9 Mar 2026 21:46:20 +0800 Subject: [PATCH] Add radix parameter to parseInt calls in DurationInput Co-Authored-By: Claude Opus 4.6 --- src/components/DurationInput.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;