You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be very helpful when trying to render values that may be a list or a single item.
I have a template that renders images ... sometimes the images urls are in a list and sometimes it is just a single image url. The same template is used to render photos (many) and logo's (1) .. hence the list and the single image in different contexts.
I have a section for images and then a value containing either a list or a single url depending on the context.
{{#image}}
{{#value}}
<img src="{{.}}" .....
{{/value}}
{{/image}}
This works fine for lists but . context does not seem to be set for single items.
For now I will just convert single images to a list but this would be nice unless there is a reason for it to work this way.
Outputs:
"hello [object Object]!"
Expected:
"hello foo!"
Not sure if this is by design. The scalate mustache implementation renders this as expected.
The text was updated successfully, but these errors were encountered: