Skip to content

Commit

Permalink
IBX-7294: Gracefully handle missing user's thumbnail image (#1031)
Browse files Browse the repository at this point in the history
IBX-7138: Gracefully handle missing user's thumbnail image
  • Loading branch information
barw4 authored Dec 19, 2023
1 parent bde9b5e commit 9f3a7fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% set user_image = user_content.thumbnail %}

{% if user_image.mimeType == 'image/svg+xml' %}
{% if user_image.mimeType is defined and user_image.mimeType == 'image/svg+xml' %}
{% set attr_svg = attr_svg|default({})|merge({
class: ('ibexa-user-thumbnail--svg ' ~ attr_svg.class|default(''))|trim,
width: attr_svg.width is defined ? attr_svg.width : '24',
Expand All @@ -13,7 +13,7 @@
<svg {{ html.attributes(attr_svg|default({})) }}>
<use xlink:href="{{ user_image.resource }}"></use>
</svg>
{% else %}
{% elseif (user_image.resource is defined) %}
{% set attr_img = attr_img|default({})|merge({
class: ('ibexa-user-thumbnail--img ' ~ attr_img.class|default(''))|trim,
src: attr_img.src is defined ? attr_img.src : user_image.resource,
Expand Down

0 comments on commit 9f3a7fd

Please sign in to comment.