Et2Widget: Fix widgets could not pull objects from content to use as attributes

et2-vfs-mime for files in kanban is an example
This commit is contained in:
nathan 2022-08-25 13:25:45 -06:00
parent 080dea2378
commit 4d8bd89952

View File

@ -1438,8 +1438,12 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes)
break; break;
case Object: case Object:
case Array: case Array:
// Leave it alone... // Leave it alone if it's not a string
break; if(typeof attrValue !== "string")
{
break;
}
// fall through to look in content
default: default:
attrValue = mgr ? mgr.expandName("" + attrValue) : attrValue; attrValue = mgr ? mgr.expandName("" + attrValue) : attrValue;
if(attrValue && typeof attrValue == "string" && widget_class.translate[attribute]) if(attrValue && typeof attrValue == "string" && widget_class.translate[attribute])