From 3ddefaf47045edd12953672f1b39bc39861b7412 Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Thu, 13 Feb 2020 16:16:06 -0800 Subject: [PATCH] fix(amazon/instance): fix npe when applying health to instances (#7893) --- app/scripts/modules/amazon/src/instance/details/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/scripts/modules/amazon/src/instance/details/utils.ts b/app/scripts/modules/amazon/src/instance/details/utils.ts index 1aab1bb76d5..f2d313b3197 100644 --- a/app/scripts/modules/amazon/src/instance/details/utils.ts +++ b/app/scripts/modules/amazon/src/instance/details/utils.ts @@ -19,7 +19,7 @@ export const applyHealthCheckInfoToTargetGroups = ( const group = targetGroups[tg.name] ?? ({} as ITargetGroup); const useTrafficPort = group.healthCheckPort === 'traffic-port' || isNil(group.healthCheckPort); const port = useTrafficPort ? group.port : group.healthCheckPort; - tg.healthCheckProtocol = group.healthCheckProtocol.toLowerCase(); + tg.healthCheckProtocol = group.healthCheckProtocol?.toLowerCase(); tg.healthCheckPath = `:${port}${group.healthCheckPath}`; }); }