mirror of
				https://github.com/louislam/uptime-kuma.git
				synced 2025-11-04 13:46:13 +08:00 
			
		
		
		
	Fix: use Optional chaining
This commit is contained in:
		@@ -76,7 +76,7 @@ class Monitor extends BeanModel {
 | 
				
			|||||||
                    bean.ping = dayjs().valueOf() - startTime;
 | 
					                    bean.ping = dayjs().valueOf() - startTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Check certificate if https is used
 | 
					                    // Check certificate if https is used
 | 
				
			||||||
                    if (this.getUrl().protocol === "https:") {
 | 
					                    if (this.getUrl()?.protocol === "https:") {
 | 
				
			||||||
                        await this.updateTlsInfo(checkCertificate(res));
 | 
					                        await this.updateTlsInfo(checkCertificate(res));
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,7 +54,7 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="shadow-box big-padding text-center stats" v-if="monitor.type === 'http' && monitor.getUrl().protocol === 'https:' && certInfo != null">
 | 
					    <div class="shadow-box big-padding text-center stats" v-if="monitor.type === 'http' && monitor.getUrl()?.protocol === 'https:' && certInfo != null">
 | 
				
			||||||
        <div class="row">
 | 
					        <div class="row">
 | 
				
			||||||
            <div class="col">
 | 
					            <div class="col">
 | 
				
			||||||
                <h4>Certificate Info</h4>
 | 
					                <h4>Certificate Info</h4>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user