fix(core): getCountUnread error when guest access

This commit is contained in:
OldHawk
2017-06-19 13:11:00 +08:00
parent 418f7fa5cc
commit 6d70d4e83f

View File

@@ -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;
});
}
};
/**