diff --git a/connect/community/community.service.ts b/connect/community/community.service.ts index 3d328f2f..d3f60084 100644 --- a/connect/community/community.service.ts +++ b/connect/community/community.service.ts @@ -56,6 +56,7 @@ export class CommunityService { async getCommunityAsync() { await this.promise; + this.clearSubscriptions(); return this.community.getValue(); } diff --git a/sharedComponents/navigationBar.component.ts b/sharedComponents/navigationBar.component.ts index 5f7c8bff..06dc9d15 100644 --- a/sharedComponents/navigationBar.component.ts +++ b/sharedComponents/navigationBar.component.ts @@ -1,4 +1,4 @@ -import {Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core'; +import {Component, Input, OnDestroy, OnInit} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Session, User} from '../login/utils/helper.class'; import {ConfigurationService} from '../utils/configuration/configuration.service'; @@ -91,10 +91,12 @@ export class NavigationBarComponent implements OnInit, OnDestroy { }; } this.isAuthorized = Session.isClaimsCurator(this.user) || Session.isPortalAdministrator(this.user); - if (this.properties.adminToolsAPIURL && this.communityId) { + if ((this.properties.adminToolsAPIURL && this.communityId) || properties.adminToolsPortalType == "community") { //this.config.getCommunityInformation(this.properties, this.communityId).subscribe(data => { this.subs.push(this.config.communityInformationState.subscribe(data => { if (data) { + this.showEntity = {}; + this.showPage = {}; if (data['entities']) { for (let i = 0; i < data['entities'].length; i++) {