From 81cc7edac108f6c19b4ea9ce9d4282781687e404 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Thu, 2 Jul 2015 09:09:51 +0200 Subject: [PATCH] [Backport] fix issue #2956 - fix infinite loading spinner in the contacts tab with anonymous users --- .../profile-contacts/profile-contacts.controller.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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