mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
Avoid parse error that breaks load if string is passed as an object property
This commit is contained in:
parent
847bf6139f
commit
04feaff1d0
@ -1476,7 +1476,15 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes)
|
|||||||
else if(attrValue && [Object, Array].indexOf(typeof property === "object" ? property.type : property) != -1)
|
else if(attrValue && [Object, Array].indexOf(typeof property === "object" ? property.type : property) != -1)
|
||||||
{
|
{
|
||||||
// Value was not supposed to be a string, but was run through here for expandName
|
// Value was not supposed to be a string, but was run through here for expandName
|
||||||
attrValue = JSON.parse(attrValue);
|
try
|
||||||
|
{
|
||||||
|
attrValue = JSON.parse(attrValue);
|
||||||
|
}
|
||||||
|
catch(e)
|
||||||
|
{
|
||||||
|
console.info(widget_class.name + "#" + widget.id + " attribute '" + attribute + "' has type " +
|
||||||
|
(typeof property === "object" ? property.type.name : property.name) + " but value %o could not be parsed", attrValue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user