[angular-16-irish-montitor | CHANGED]: admin dashboard chech data first before params for stakeholder.

This commit is contained in:
Konstantinos Triantafyllou 2024-01-08 17:40:05 +02:00
parent d61a70cc5a
commit 54a7ad165e
1 changed files with 1 additions and 1 deletions

View File

@ -38,6 +38,6 @@ export class AdminDashboardGuard {
}
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
return this.check(state.url, childRoute.params.stakeholder);
return this.check(state.url, childRoute.data?.stakeholder?childRoute.data.stakeholder:childRoute.params.stakeholder);
}
}