diff --git a/modules/core/client/controllers/header.client.controller.js b/modules/core/client/controllers/header.client.controller.js index 662bb6b5..ab99953b 100644 --- a/modules/core/client/controllers/header.client.controller.js +++ b/modules/core/client/controllers/header.client.controller.js @@ -72,9 +72,11 @@ }; vm.getCountUnread = function () { - MessagesService.countUnread(function (data) { - vm.unreadCount = data.countFrom + data.countTo; - }); + if (Authentication.user) { + MessagesService.countUnread(function (data) { + vm.unreadCount = data.countFrom + data.countTo; + }); + } }; /**