diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index e085ea3a3..34a2be663 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -1166,9 +1166,9 @@ define([ var hexFileName = Util.base64ToHex(secret.channel); var src = Hash.getBlobPathFromHex(hexFileName); Common.getFileSize(hexFileName, function (e, data) { - if (e) { + if (e || !data) { displayDefault(); - return void console.error(e); + return void console.error(e || "404 avatar"); } if (typeof data !== "number") { return void displayDefault(); } if (Util.bytesToMegabytes(data) > 0.5) { return void displayDefault(); } diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index d4c4b30f0..6b1a5b4a5 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -92,7 +92,7 @@ define([ var profileChan = profile.edit ? Hash.hrefToHexChannelId('/profile/#' + profile.edit, null) : null; if (profileChan) { list.push(profileChan); } var avatarChan = profile.avatar ? Hash.hrefToHexChannelId(profile.avatar, null) : null; - if (avatarChan) { list.push(avatarChan); } + if (avatarChan) { list.push(Util.base64ToHex(avatarChan)); } } if (store.proxy.friends) {