Avoid JS errors if value is not a string

This commit is contained in:
nathan 2022-07-04 15:12:10 -06:00
parent 31e476089c
commit af33cec90d

View File

@ -1387,7 +1387,7 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes)
break;
default:
attrValue = mgr ? mgr.expandName("" + attrValue) : attrValue;
if(attrValue && !attributes.no_lang && widget_class.translate[attribute])
if(attrValue && typeof attrValue == "string" && !attributes.no_lang && widget_class.translate[attribute])
{
// allow attribute to contain multiple translated sub-strings eg: {Firstname}.{Lastname}
if(attrValue.indexOf('{') !== -1)