1
0
Fork 0
mirror of https://github.com/pawelmalak/flame.git synced 2025-08-05 10:55:17 +02:00

fix: optional chaining hosts as well

This commit is contained in:
Devin Buhl 2022-01-09 12:39:32 -05:00 committed by GitHub
parent a422dd27f0
commit 4ec67a54c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,7 @@ const useKubernetes = async (apps) => {
const annotations = ingress.metadata.annotations;
const name = ingress.metadata.name;
let url = "http://" + ingress.spec.rules[0].host;
if (ingress.spec.tls?.[0].hosts[0]) {
if (ingress.spec.tls?.[0].hosts?.[0]]) {
url = "https://" + ingress.spec.tls[0].hosts[0];
}