all lists on 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

* [pbs-devel] applied: Re: [PATCH widget-toolkit] fix #4951: accept undefined as value for the MultiDiskSelector
  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 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-09-07 15:49 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Dominik Csapak

On 07/09/2023 14:18, Dominik Csapak wrote:
> 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(+)
> 
>

applied, thanks!




^ 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal