From fec07293cb6ecc2a39671ef72906475d52dffb28 Mon Sep 17 00:00:00 2001 From: Kiloson <4closetool3@gmail.com> Date: Wed, 10 Jan 2024 17:24:17 +0800 Subject: [PATCH] fix: space Signed-off-by: Kiloson <4closetool3@gmail.com> --- src/pages/instances/Pods/components/Badge.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/instances/Pods/components/Badge.tsx b/src/pages/instances/Pods/components/Badge.tsx index 42acd60a..6664d30f 100644 --- a/src/pages/instances/Pods/components/Badge.tsx +++ b/src/pages/instances/Pods/components/Badge.tsx @@ -52,6 +52,11 @@ interface BadgeBarProps { export const BadgeBar = (props: BadgeBarProps) => { const { badges } = props; + + if (!badges || badges.length === 0) { + return null; + } + return ( {badges.map((badge) => )} @@ -73,6 +78,9 @@ export const ClusterBadgeBar = (props: ClusterBadgeBarProps) => { }, }); + if (!badges || badges.length === 0) { + return null; + } return (