openplans / shareabouts

Shareabouts is a mapping application for crowdsourced info gathering.
GNU General Public License v3.0
278 stars 149 forks source link

Loop over attachments #226

Closed BenSturmfels closed 12 months ago

BenSturmfels commented 1 year ago

Found this needed to have each to show the attachment images.

BenSturmfels commented 1 year ago

@mjumbewu I don't use handlebars a lot though, so let me know if I've missed something.

mjumbewu commented 12 months ago

:thinking: Hm, this one is odd. It should work without the each. Handlebars is a superset of the Mustache template language, and using {{#attachements}} is how you would iterate over an array in Mustache. In handlebars, {{#attachments}} and {{#each attachments}} should be synonymous, if attachments is an Array. But maybe there's something nuanced that I'm missing. What were you seeing before making the change?

BenSturmfels commented 12 months ago

Ignore this, just tested again on master and it's working fine. I suspect this is a patch we've been carrying along that was required at one point, but for whatever reason no longer is.