diff sat_templates/templates/default/components/avatar.html @ 233:1215a6e2385f

components/avatar: fixed avatar if `identity.avatar_basename` is None
author Goffi <goffi@goffi.org>
date Tue, 19 May 2020 18:40:53 +0200
parents 3195484abd82
children
line wrap: on
line diff
--- a/sat_templates/templates/default/components/avatar.html	Tue May 19 18:40:02 2020 +0200
+++ b/sat_templates/templates/default/components/avatar.html	Tue May 19 18:40:53 2020 +0200
@@ -1,6 +1,6 @@
 {% macro avatar(jid, class) %}
     {%- if identities is defined -%}
-        {%- if identities[jid].avatar_basename is defined %}
+        {%- if identities[jid].avatar_basename %}
             <img class="avatar {{class}}" src="/cache/common/{{identities[jid].avatar_basename}}">
         {% else %}
             <span class="avatar avatar--generated {{class}}"><span class="avatar__content">{{identities[jid].nicknames[0]|first|upper}}</span></span>