Avoid error if expand finds nothing for the value (returns null)

This commit is contained in:
nathan 2021-12-16 13:05:13 -07:00
parent 9a3753eb93
commit 3f71a75c86

View File

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