changeset 398:6ae380307ddc

bulma (components/avatar): fix template when not identity is found.
author Goffi <goffi@goffi.org>
date Thu, 06 Jun 2024 15:21:47 +0200
parents b313a7d343af
children e7152fc8a81f
files sat_templates/templates/bulma/components/avatar.html
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/components/avatar.html	Thu May 30 17:08:21 2024 +0200
+++ b/sat_templates/templates/bulma/components/avatar.html	Thu Jun 06 15:21:47 2024 +0200
@@ -1,7 +1,7 @@
 {% macro avatar(jid, class="is-48x48") %}
     {%- if identities is defined -%}
         {% set identity = identities.get(jid) %}
-        {%- if identity.avatar.filename %}
+        {%- if identity and identity.avatar.filename %}
             <div class="is-avatar image {{class}}">
                 <img src="/cache/common/{{identity.avatar.filename}}">
             </div>