From: Dominik Csapak Date: Thu, 7 Sep 2023 12:18:05 +0000 (+0200) Subject: fix #4951: accept undefined as value for the MultiDiskSelector X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=9133d5b5f9932189cdb497580fe8e2de3b6bfb7f fix #4951: accept undefined as value for the MultiDiskSelector otherwise it tries to string split it and throws an exception This can happen when there was no initial value and the form is reset. Signed-off-by: Dominik Csapak --- diff --git a/src/form/MultiDiskSelector.js b/src/form/MultiDiskSelector.js index 88cdc80..33bcf28 100644 --- a/src/form/MultiDiskSelector.js +++ b/src/form/MultiDiskSelector.js @@ -39,6 +39,8 @@ Ext.define('Proxmox.form.MultiDiskSelector', { setValue: function(value) { let me = this; + value ??= []; + if (!Ext.isArray(value)) { value = value.split(/;, /); }