mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Do not crash if ingress is missing status.loadbalancer.ingress property (#5665)
This commit is contained in:
1 parent
0784085bf4
commit
666d90dd3c
2 files changed
+49
-2
No files matched your search
@@ -136,7 +136,7 @@ export interface IngressSpec {
|
||||
|
||||
export interface IngressStatus {
|
||||
loadBalancer: {
|
||||
ingress: ILoadBalancerIngress[];
|
||||
ingress?: ILoadBalancerIngress[];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ export class Ingress extends KubeObject<IngressStatus, IngressSpec, KubeObjectSc
|
||||
}
|
||||
|
||||
getLoadBalancers() {
|
||||
return this.status?.loadBalancer.ingress.map(address => (
|
||||
return this.status?.loadBalancer?.ingress?.map(address => (
|
||||
address.hostname || address.ip
|
||||
)) ?? [];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user