Merge pull request #2922 from bolt/bugfix/empty-image-alt-throws-error

An empty image alt made the page throw an error
This commit is contained in:
Bob den Otter
2021-11-10 18:29:39 +01:00
committed by GitHub
+1 -1
View File
@@ -3,7 +3,7 @@
<a href="{{ record|image }}">
<img src="{{ thumbnail(record, 1368, 1026) }}" alt="{{ (record|image).alt|default(record|title) }}">
</a>
{% if image.alt %}
{% if image.alt|default('') %}
<figcaption>{{ image.alt }}</figcaption>
{% endif %}
</figure>