[pve-devel] [PATCH v2 stable-7+master manager 1/2] ui: vm selector: handle empty string gracefully

Fiona Ebner f.ebner at proxmox.com
Mon Sep 25 13:36:06 CEST 2023


Am 25.09.23 um 13:17 schrieb Dominik Csapak:
> 
> sorry for the late answer
> 
> the patch LGTM, but i would even go a step further and do a
> ----
> value ??= [];
> ----
> 
> before the isArray check (that way we'd also handle undefined/null values)
> (can ofc be done as a follow-up/later)
> 
> 
> an alternative would be to filter out all empty values e.g. like this:
> 
> ---
> value.split(',').filter(v => v !== '')
> ---
> 
> this would then also handle values like: '100,,200'
> idk if that's even possible to get here
> 

Thank you for the review! I'll send a v3 with the suggested changes.





More information about the pve-devel mailing list