From 3f71a75c8624fc2223b1e61d44d9f0a6322b33e8 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 16 Dec 2021 13:05:13 -0700 Subject: [PATCH] Avoid error if expand finds nothing for the value (returns null) --- api/js/etemplate/Et2Widget/Et2Widget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Widget/Et2Widget.ts b/api/js/etemplate/Et2Widget/Et2Widget.ts index a02fd55373..7549a985a7 100644 --- a/api/js/etemplate/Et2Widget/Et2Widget.ts +++ b/api/js/etemplate/Et2Widget/Et2Widget.ts @@ -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)