[pbs-devel] [PATCH widget-toolkit] fix #4951: accept undefined as value for the MultiDiskSelector
Dominik Csapak
d.csapak at proxmox.com
Thu Sep 7 14:18:05 CEST 2023
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 <d.csapak at proxmox.com>
---
src/form/MultiDiskSelector.js | 2 ++
1 file changed, 2 insertions(+)
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(/;, /);
}
--
2.30.2
More information about the pbs-devel
mailing list