diff --git a/app/modules/profile/profile-contacts/profile-contacts.controller.coffee b/app/modules/profile/profile-contacts/profile-contacts.controller.coffee index cae24b1c..b06f4768 100644 --- a/app/modules/profile/profile-contacts/profile-contacts.controller.coffee +++ b/app/modules/profile/profile-contacts/profile-contacts.controller.coffee @@ -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