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

stable
Juanfran 2015-07-02 09:09:51 +02:00 committed by David Barragán Merino
parent b95df3e368
commit 81cc7edac1
1 changed files with 2 additions and 3 deletions

View File

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