[Trunk | Connect]: app.component.ts: [Bug fix] Check if user is not undefined or null.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@57083 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2019-09-16 09:33:23 +00:00
parent 91d0246b62
commit bec026f9f3
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ export class AppComponent {
let isCommunityManager: boolean = false;
if (Session.isCommunityCurator(this.user) || Session.isPortalAdministrator(this.user)) {
isCommunityManager = true;
} else if (com.managers.indexOf(this.user.email) != -1) {
} else if (this.user && com.managers.indexOf(this.user.email) != -1) {
isCommunityManager = true;
}
this.community = {