fix query selector in handleUnitChange

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-16 16:07:06 -08:00
parent 680bb92242
commit c21838d760

View File

@ -174,7 +174,7 @@ function addDiskLine (fieldset, busPrefix, busName, device, storage, storageOpti
function handleUnitChange () {
let newUnitIndex = this.selectedIndex;
let sizeInput = document.querySelector(`${this.id.replace("unit", "size")}`);
let sizeInput = document.querySelector(`#${this.id.replace("unit", "size")}`);
if (newUnitIndex == 0) {
sizeInput.min = sizeInput.minSize;
if (sizeInput.value < sizeInput.min) {