Skip to content

Commit 59536d5

Browse files
committed
Fix wrapper class when no base class is set
1 parent 332c365 commit 59536d5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

modules/@apostrophecms/image-widget/views/fragment.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/>
99
{%- elif attachment -%}
1010
{%- set className = options.className or manager.options.className -%}
11-
<figure class="{{ className + "__wrapper" }}" style="{{ _figureStyle(options, manager) | trim }}">
11+
<figure{% if className %} class="{{ className + "__wrapper" }}"{% endif %} style="{{ _figureStyle(options, manager) | trim }}">
1212
{{ _imageWithLink(widget, attachment, options, manager, contextOptions) -}}
1313
{% if widget.caption -%}<figcaption class="{{ className + "__caption" }}">
1414
{{ widget.caption }}
@@ -30,7 +30,7 @@
3030
{%- set dimensionAttrs = options.dimensionAttrs or manager.options.dimensionAttrs -%}
3131
{%- set loadingType = options.loadingType or manager.options.loadingType -%}
3232
{%- set size = options.size or manager.options.size or 'full' -%}
33-
<img {% if className %} class="{{ className }}"{% endif %}
33+
<img{% if className %} class="{{ className }}"{% endif %}
3434
{% if loadingType %} loading="{{ loadingType }}"{% endif %}
3535
data-apos-test="image-widget"
3636
srcset="{{ apos.image.srcset(attachment) }}"

0 commit comments

Comments
 (0)