fix compilation issue GitlabOrgDiscoveryEntityProvider

Signed-off-by: Matteo Silvestri <matteosilv@gmail.com>
This commit is contained in:
Matteo Silvestri
2023-02-22 13:08:12 +01:00
parent fc2b7e8858
commit 3d96343887
@@ -295,7 +295,7 @@ export class GitlabOrgDiscoveryEntityProvider implements EntityProvider {
private withLocations(host: string, baseUrl: string, entity: Entity): Entity {
const location =
entity.kind === 'Group'
? `url:${baseUrl}/${entity.metadata.annotations[`${host}/team-path`]}`
? `url:${baseUrl}/${entity.metadata.annotations?.[`${host}/team-path`]}`
: `url:${baseUrl}/${entity.metadata.name}`;
return merge(
{