   clicked: (e) =>
     @setState loading: true
 
-    if @state.friend
+    if @state.friend?
       #un-friending
       @xhr = $.ajax
         type: "DELETE"



  followers: =>
    @state.followersWithoutSelf + (if @state.friend then 1 else 0)


  isVisible: =>

    title = switch
      when !isVisible
        null
      when @state.friend?
        osu.trans('friends.buttons.remove')
      when isFriendLimit
        osu.trans('friends.too_many')
      else
        osu.trans('friends.buttons.add')

    disabled = !isVisible || @state.loading || isFriendLimit && !@state.friend?

    if @state.friend? && !@state.loading
      if @state.friend.mutual
        blockClass += " #{bn}--mutual"
      else
