From 4ec67a54c2633fd02c19f7951dd3653d179b2973 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Sun, 9 Jan 2022 12:39:32 -0500 Subject: [PATCH] fix: optional chaining hosts as well --- controllers/apps/docker/useKubernetes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/apps/docker/useKubernetes.js b/controllers/apps/docker/useKubernetes.js index b0e8842..a58517a 100644 --- a/controllers/apps/docker/useKubernetes.js +++ b/controllers/apps/docker/useKubernetes.js @@ -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]; }