Skip to content

Commit

Permalink
Merge pull request #78 from PagerDuty/next
Browse files Browse the repository at this point in the history
release: 0.8.2
  • Loading branch information
t1agob authored Jul 23, 2024
2 parents 8fd2bf5 + 0e93601 commit 5a85c58
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ export async function createComponentEntitiesReferenceDict({ items: componentEnt
const componentEntitiesDict: Record<string, { ref: string, name: string }> = {};

await Promise.all(componentEntities.map(async (entity) => {
const annotations: Annotations = JSON.parse(JSON.stringify(entity.metadata.annotations));
const serviceId = annotations['pagerduty.com/service-id'];
const integrationKey = annotations['pagerduty.com/integration-key'];
const account = annotations['pagerduty.com/account'] ?? "";
const serviceId = entity.metadata.annotations?.['pagerduty.com/service-id'];
const integrationKey = entity.metadata.annotations?.['pagerduty.com/integration-key'];
const account = entity.metadata.annotations?.['pagerduty.com/account'];

if (serviceId !== undefined && serviceId !== "") {
componentEntitiesDict[serviceId] = {
Expand Down

0 comments on commit 5a85c58

Please sign in to comment.