Skip to content

Commit 2715608

Browse files
authored
Fix mapping over null reference for KMS endpoints (#3367)
1 parent 6a591c1 commit 2715608

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

web-app/src/screens/Console/KMS/Status.tsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -203,19 +203,20 @@ const Status = () => {
203203
label={"Key Management Service Endpoints:"}
204204
value={
205205
<Fragment>
206-
{status.endpoints?.map((e: any, i: number) => (
207-
<LabelWithIcon
208-
key={i}
209-
icon={
210-
e.status === "online" ? (
211-
<EnabledIcon />
212-
) : (
213-
<DisabledIcon />
214-
)
215-
}
216-
label={e.url}
217-
/>
218-
))}
206+
{status.endpoints &&
207+
status.endpoints.map((e: any, i: number) => (
208+
<LabelWithIcon
209+
key={i}
210+
icon={
211+
e.status === "online" ? (
212+
<EnabledIcon />
213+
) : (
214+
<DisabledIcon />
215+
)
216+
}
217+
label={e.url}
218+
/>
219+
))}
219220
</Fragment>
220221
}
221222
/>

0 commit comments

Comments
 (0)