fix issue #2956 - fix infinite loading spinner in the contacts tab with anonymous users
parent
e2b527bf11
commit
ac3c116754
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue