diff --git a/error/isRouteEnabled.guard.ts b/error/isRouteEnabled.guard.ts index 3a59488c..f65b488a 100644 --- a/error/isRouteEnabled.guard.ts +++ b/error/isRouteEnabled.guard.ts @@ -33,12 +33,12 @@ export class IsRouteEnabled implements CanActivate { if (!community) { community = ConnectHelper.getCommunityFromDomain(res.domain); } - return res['adminToolsAPIURL']; - }),mergeMap(url => { + return res; + }),mergeMap(prop => { if (!community) { // no community to check - return true return observableOf(true); } - return this.config.isPageEnabled(url, community, '/' + path.split('?')[0].substring(1)); + return this.config.isPageEnabled(prop, community, '/' + path.split('?')[0].substring(1)); }),); obs.pipe(filter(enabled => !enabled)) .subscribe(() => this.router.navigate([redirect], {queryParams: {'page': path}}));