From 4d8bd89952324d9521b8d4d8d9450af76aa8a95c Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 25 Aug 2022 13:25:45 -0600 Subject: [PATCH] Et2Widget: Fix widgets could not pull objects from content to use as attributes et2-vfs-mime for files in kanban is an example --- api/js/etemplate/Et2Widget/Et2Widget.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index 2af9215086..df03d18c60 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -1438,8 +1438,12 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes) break; case Object: case Array: - // Leave it alone... - break; + // Leave it alone if it's not a string + if(typeof attrValue !== "string") + { + break; + } + // fall through to look in content default: attrValue = mgr ? mgr.expandName("" + attrValue) : attrValue; if(attrValue && typeof attrValue == "string" && widget_class.translate[attribute])