File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
components/certificateRequests Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export function CertificateRequestDetail() {
7272 } ,
7373 {
7474 name : 'CA' ,
75- value : item . status . ca && < CopyToClipboard text = { item . status . ca } /> ,
75+ value : item . status ? .ca && < CopyToClipboard text = { item . status . ca } /> ,
7676 } ,
7777 {
7878 name : 'Failure Time' ,
@@ -84,7 +84,7 @@ export function CertificateRequestDetail() {
8484 item && [
8585 {
8686 id : 'Status' ,
87- section : item . status . conditions && (
87+ section : item . status ? .conditions && (
8888 < ConditionsTable conditions = { item . status . conditions } />
8989 ) ,
9090 } ,
Original file line number Diff line number Diff line change @@ -123,7 +123,9 @@ export class Certificate extends KubeObject<CertManagerCertificate> {
123123 static isNamespaced = true ;
124124
125125 get ready ( ) {
126- return this . status . conditions . find ( condition => condition . type === 'Ready' ) ?. status === 'True' ;
126+ return (
127+ this . status ?. conditions ?. find ( condition => condition . type === 'Ready' ) ?. status === 'True'
128+ ) ;
127129 }
128130
129131 // Note: This workaround is needed to make the plugin compatible with older versions of Headlamp
Original file line number Diff line number Diff line change @@ -43,14 +43,14 @@ export class CertificateRequest extends KubeObject<CertManagerCertificateRequest
4343 }
4444
4545 get approved ( ) {
46- return this . status . conditions . find ( condition => condition . type === 'Approved' ) ?. status ;
46+ return this . status ? .conditions ? .find ( condition => condition . type === 'Approved' ) ?. status ;
4747 }
4848
4949 get denied ( ) {
50- return this . status . conditions . find ( condition => condition . type === 'Denied' ) ?. status ;
50+ return this . status ? .conditions ? .find ( condition => condition . type === 'Denied' ) ?. status ;
5151 }
5252
5353 get ready ( ) {
54- return this . status . conditions . find ( condition => condition . type === 'Ready' ) ?. status ;
54+ return this . status ? .conditions ? .find ( condition => condition . type === 'Ready' ) ?. status ;
5555 }
5656}
You can’t perform that action at this time.
0 commit comments