Skip to content

Commit

Permalink
Fix mapping over null reference for KMS endpoints (#3367)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivaj05 committed Jun 3, 2024
1 parent 6a591c1 commit 2715608
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions web-app/src/screens/Console/KMS/Status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,20 @@ const Status = () => {
label={"Key Management Service Endpoints:"}
value={
<Fragment>
{status.endpoints?.map((e: any, i: number) => (
<LabelWithIcon
key={i}
icon={
e.status === "online" ? (
<EnabledIcon />
) : (
<DisabledIcon />
)
}
label={e.url}
/>
))}
{status.endpoints &&
status.endpoints.map((e: any, i: number) => (
<LabelWithIcon
key={i}
icon={
e.status === "online" ? (
<EnabledIcon />
) : (
<DisabledIcon />
)
}
label={e.url}
/>
))}
</Fragment>
}
/>
Expand Down

0 comments on commit 2715608

Please sign in to comment.