[pve-devel] [PATCH pve-manager 1/2] fix #1981: get next free disk id on change of bus/device

Matthias Heiserer m.heiserer at proxmox.com
Wed Sep 28 12:28:03 CEST 2022


On 28.09.2022 11:37, Stefan Hrdlicka wrote:
>   	if (freeId !== undefined) {
> -	    busField.setValue(freeId.controller);
> +	    if (busField !== undefined) {
> +		busField.setValue(freeId.controller);
> +	    }
nit: IMO, optional chaining (?.) would make this more readable:
     busField?.setValue(freeId.controller);

Semantically, it should be more or less the same.
>   	    deviceIDField.setValue(freeId.id);
>   	}
>       },






More information about the pve-devel mailing list