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 0d2a2763c9
commit c8141943f5

View File

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