fix min checking

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-16 16:10:56 -08:00
parent b8fb562c41
commit b928f87a79

View File

@ -177,7 +177,7 @@ function handleUnitChange () {
let sizeInput = document.querySelector(`#${this.id.replace("unit", "size")}`); let sizeInput = document.querySelector(`#${this.id.replace("unit", "size")}`);
if (newUnitIndex == 0) { if (newUnitIndex == 0) {
sizeInput.min = sizeInput.minSize; sizeInput.min = sizeInput.minSize;
if (sizeInput.value < sizeInput.min) { if (parseInt(sizeInput.value) < parseInt(sizeInput.min)) {
sizeInput.value = sizeInput.min; sizeInput.value = sizeInput.min;
} }
} }