From 6d43dbb8eb264eb2187cb53952e6ca48063325e2 Mon Sep 17 00:00:00 2001 From: Jim Ehrismann Date: Thu, 28 Oct 2021 15:29:19 -0400 Subject: [PATCH] simplify the namespace selector placeholder logic Signed-off-by: Jim Ehrismann --- .../components/+namespaces/namespace-select-filter.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/renderer/components/+namespaces/namespace-select-filter.tsx b/src/renderer/components/+namespaces/namespace-select-filter.tsx index a490183d7c..df435d9d4d 100644 --- a/src/renderer/components/+namespaces/namespace-select-filter.tsx +++ b/src/renderer/components/+namespaces/namespace-select-filter.tsx @@ -36,9 +36,8 @@ import { isMac } from "../../../common/vars"; const Placeholder = observer((props: PlaceholderProps) => { const getPlaceholder = (): React.ReactNode => { const namespaces = namespaceStore.contextNamespaces; - const length = namespaceStore.selectedNamespaces.length ? namespaces.length : 0; - switch (length) { + switch (namespaceStore.selectedNamespaces.length) { case 0: return <>All namespaces; case 1: