From d9a4a32bf96dd1509980ae817ae7587028f6f94f Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 28 Aug 2017 16:57:10 +0200 Subject: [PATCH] Fix avatar for anonymous users in secure pads --- www/common/sframe-common-interface.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/www/common/sframe-common-interface.js b/www/common/sframe-common-interface.js index 24b03bdae..eb4bc35a5 100644 --- a/www/common/sframe-common-interface.js +++ b/www/common/sframe-common-interface.js @@ -214,12 +214,14 @@ define([ var newName = myData.name; var url = myData.avatar; $displayName.text(newName || Messages.anonymous); - $avatar.html(''); - UI.displayAvatar(Common, $avatar, url, newName, function ($img) { - if ($img) { - $userAdmin.find('button').addClass('avatar'); - } - }); + if (accountName) { + $avatar.html(''); + UI.displayAvatar(Common, $avatar, url, newName, function ($img) { + if ($img) { + $userAdmin.find('button').addClass('avatar'); + } + }); + } }; metadataMgr.onChange(updateButton); updateButton();