diff --git a/frontend/src/components/gateway/HTTPRouteDetails.tsx b/frontend/src/components/gateway/HTTPRouteDetails.tsx index e110c9b831..03fc741657 100644 --- a/frontend/src/components/gateway/HTTPRouteDetails.tsx +++ b/frontend/src/components/gateway/HTTPRouteDetails.tsx @@ -44,7 +44,7 @@ export default function HTTPRouteDetails(props: { name?: string; namespace?: str httpRoute && [ { name: 'Hostnames', - value: `${tls}`)} />, + value: `${tls}`)} />, }, ] } diff --git a/frontend/src/components/gateway/HTTPRouteList.tsx b/frontend/src/components/gateway/HTTPRouteList.tsx index 654c702ded..bf1b5e3e11 100644 --- a/frontend/src/components/gateway/HTTPRouteList.tsx +++ b/frontend/src/components/gateway/HTTPRouteList.tsx @@ -25,7 +25,7 @@ export default function HTTPRouteList() { { id: 'rules', label: t('translation|rules'), - getValue: (httpRoute: HTTPRoute) => httpRoute.spec.rules.length, + getValue: (httpRoute: HTTPRoute) => httpRoute.spec.rules?.length, }, 'age', ]} diff --git a/frontend/src/components/gateway/__snapshots__/ClassList.Items.stories.storyshot b/frontend/src/components/gateway/__snapshots__/ClassList.Items.stories.storyshot index c513429242..b04a8586e6 100644 --- a/frontend/src/components/gateway/__snapshots__/ClassList.Items.stories.storyshot +++ b/frontend/src/components/gateway/__snapshots__/ClassList.Items.stories.storyshot @@ -10,7 +10,7 @@ class="MuiGrid-root MuiGrid-item css-13i4rnv-MuiGrid-root" >

- GRPCRoute + GRPCRoute: default-httproute

- Gateway + Gateway: default-gateway

- HTTPRoute + HTTPRoute: default-httproute

{ } get hostnames(): string[] { - return this.jsonData.spec.hostnames; + return this.jsonData.spec.hostnames || []; } get rules(): HTTPRouteRule[] { - return this.jsonData.spec.rules; + return this.jsonData.spec.rules || []; } get parentRefs(): GatewayParentReference[] { - return this.jsonData.spec.parentRefs; + return this.jsonData.spec.parentRefs || []; } static get pluralName() {