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:
parent
da5628539d
commit
a017d8aaa1
@ -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])) {
|
||||
|
Loading…
Reference in New Issue
Block a user