fix issue #2956 - fix infinite loading spinner in the contacts tab with anonymous users

stable
Juanfran 2015-07-02 09:09:51 +02:00
parent e2b527bf11
commit ac3c116754
1 changed files with 2 additions and 3 deletions

View File

@ -5,15 +5,14 @@ class ProfileContactsController
]
constructor: (@userService, @currentUserService) ->
loadContacts: () ->
@.currentUser = @currentUserService.getUser()
@.isCurrentUser = false
if @.currentUser.get("id") == @.user.get("id")
if @.currentUser && @.currentUser.get("id") == @.user.get("id")
@.isCurrentUser = true
loadContacts: () ->
@userService.getContacts(@.user.get("id"))
.then (contacts) =>
@.contacts = contacts