ui: make parsePropertyString less picky

simply return a empty object for cases we would get an exception
anyway, this is not wrong and allows easier usage for cases where
it's not sure if the value is set or not.

We could still do a Ext.isDebugEnabled() check and then throw up, but
this really should not matter much and I do not like if my debug mode
breaks and the non-debug not..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2019-10-04 16:07:49 +02:00
parent da5628539d
commit a017d8aaa1

View File

@ -49,6 +49,10 @@ Ext.define('PVE.Parser', { statics: {
var res = {},
error;
if (typeof value !== 'string' || value === '') {
return res;
}
Ext.Array.each(value.split(','), function(p) {
var kv = p.split('=', 2);
if (Ext.isDefined(kv[1])) {