From e7e9e93f5730ccbda905d388b382f3a7fe16c1a6 Mon Sep 17 00:00:00 2001 From: Andrew Johnson <57673895+anderoo@users.noreply.github.com> Date: Wed, 12 May 2021 09:41:25 +0100 Subject: [PATCH] Update GithubDeploymentsCard.tsx Signed-off-by: anderoo --- .../src/components/GithubDeploymentsCard.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx index b7f2e7b1ba..4cb01f04a8 100644 --- a/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx +++ b/plugins/github-deployments/src/components/GithubDeploymentsCard.tsx @@ -73,10 +73,8 @@ export const GithubDeploymentsCard = ({ columns?: TableColumn[]; }) => { const { entity } = useEntity(); - const host: string | undefined = [ - entity?.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION], - entity?.metadata.annotations?.[LOCATION_ANNOTATION], - ].filter(Boolean)[0]; + const [host] = [entity?.metadata.annotations?.[SOURCE_LOCATION_ANNOTATION], + entity?.metadata.annotations?.[LOCATION_ANNOTATION]].filter(Boolean); return !isGithubDeploymentsAvailable(entity) ? (