diff --git a/public/scss/generics.scss b/public/scss/generics.scss index 6f330eb506..c16991b2d5 100644 --- a/public/scss/generics.scss +++ b/public/scss/generics.scss @@ -99,6 +99,10 @@ &.avatar-rounded { border-radius: 50%; } + + &+.avatar { + display: none; + } } .ban-modal { diff --git a/public/src/modules/helpers.common.js b/public/src/modules/helpers.common.js index 6225aec921..373298e7fe 100644 --- a/public/src/modules/helpers.common.js +++ b/public/src/modules/helpers.common.js @@ -278,19 +278,23 @@ module.exports = function (utils, Benchpress, relative_path) { attributes.unshift(`class="avatar ${classNames}${rounded ? ' avatar-rounded' : ''}"`); - // Component override + // Component override -- FIXME if (component) { attributes.push('component="' + component + '"'); } else { attributes.push('component="avatar/' + (userObj.picture ? 'picture' : 'icon') + '"'); } + let output = ''; + if (userObj.picture) { return ''; } styles.push('background-color: ' + userObj['icon:bgColor'] + ';'); - return '' + userObj['icon:text'] + ''; + output += '' + userObj['icon:text'] + ''; + + return output; } function register() {