]> git.proxmox.com Git - pve-manager.git/commit - www/manager6/Utils.js
ui: Utils: delete_if_default: add values by correct type
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 9 Apr 2020 14:10:47 +0000 (16:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 26 Apr 2020 11:12:28 +0000 (13:12 +0200)
commit2db8e90d66be991b1bb93ad4b7874758189a97b0
treeef9d9b91a038f616181e3ab2103ae155ec22f6d3
parentefff7eab9afe6a4d674df9ee8b5652d661e9451d
ui: Utils: delete_if_default: add values by correct type

if 'delete' is an Array, we want to push into it, not append a string
this could be an issue when we use an edit window with multiple inputpanels
and deleteEmpty set on some fields

we then could have an aray like this:

values: {
    delete: [
'foo',
'bar',
'baz, qux',
    ],
},

which the edit window does not handle correctly anymore
(it only does string splitting if 'delete' itself is a string)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/Utils.js