Don't show background if the user upload its avatar

stable
David Barragán Merino 2016-11-15 14:04:52 +01:00
parent 1586115771
commit 471b9571c6
2 changed files with 2 additions and 3 deletions

View File

@ -28,8 +28,7 @@ AvatarDirective = (avatarService) ->
avatar = avatarService.getAvatar(user, attributeName)
el.attr('src', avatar.url)
if avatar.bg
el.css('background', avatar.bg)
el.css('background', avatar.bg or "")
return {
link: link

View File

@ -58,7 +58,7 @@ class AvatarService
photo = null
if user instanceof Immutable.Map
if user instanceof Immutable.Map
gravatar = user.get('gravatar_id')
photo = user.get(avatarParamName)
else