public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH widget-toolkit] fix #4951: accept undefined as value for the MultiDiskSelector
@ 2023-09-07 12:18 Dominik Csapak
  2023-09-07 15:49 ` [pbs-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Dominik Csapak @ 2023-09-07 12:18 UTC (permalink / raw)
  To: pbs-devel

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@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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-07 15:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-07 12:18 [pbs-devel] [PATCH widget-toolkit] fix #4951: accept undefined as value for the MultiDiskSelector Dominik Csapak
2023-09-07 15:49 ` [pbs-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal