8a4aa4efdd
This removes the need for `switch (obj)` in the template which is not allowed in strict mode. Additionally using a named variable speeds up rendering.
7 lines
211 B
HTML
7 lines
211 B
HTML
<field var="{{{o.name}}}">
|
|
{[ if (_.isArray(o.value)) { ]}
|
|
{[ _.each(o.value,function(arrayValue) { ]}<value>{{{arrayValue}}}</value>{[ }); ]}
|
|
{[ } else { ]}
|
|
<value>{{{o.value}}}</value>
|
|
{[ } ]}</field>
|