diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 048f4c45a..2e41a8f21 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -2826,13 +2826,13 @@ define([ }; UIElements.displayAvatar = function (common, $container, href, name, cb) { var displayDefault = function () { - var text = getFirstEmojiOrCharacter(name); + var text = typeof(href) === "string" ? href : getFirstEmojiOrCharacter(name); var $avatar = $('', {'class': 'cp-avatar-default'}).text(text); $container.append($avatar); if (cb) { cb(); } }; if (!window.Symbol) { return void displayDefault(); } // IE doesn't have Symbol - if (!href) { return void displayDefault(); } + if (typeof(href) !== "string" || href.length === 1) { return void displayDefault(); } var centerImage = function ($img, $image, img) { var w = img.width; diff --git a/www/common/inner/access.js b/www/common/inner/access.js index a8887d18b..0f3052d9c 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -698,6 +698,7 @@ define([ } // Otherwise it's a stranger _owners[ed] = { + avatar: '?', name: Messages.owner_unknownUser, }; strangers++;