From 110b8714ab614963812f0deee1c1d352f6c08f1f Mon Sep 17 00:00:00 2001 From: Peter Keuter Date: Mon, 19 Feb 2024 17:57:39 +0100 Subject: [PATCH] Don't render locale selector when there are no options (#27141) Closes #27140 Signed-off-by: Peter Keuter --- js/libs/ui-shared/src/user-profile/LocaleSelector.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/libs/ui-shared/src/user-profile/LocaleSelector.tsx b/js/libs/ui-shared/src/user-profile/LocaleSelector.tsx index a94624880c..2c9d0cc125 100644 --- a/js/libs/ui-shared/src/user-profile/LocaleSelector.tsx +++ b/js/libs/ui-shared/src/user-profile/LocaleSelector.tsx @@ -23,7 +23,9 @@ export const LocaleSelector = ({ key: locale, value: localeToDisplayName(locale) || "", })); - + if (!locales.length) { + return null; + } return (