Don't render locale selector when there are no options (#27141)
Closes #27140 Signed-off-by: Peter Keuter <github@peterkeuter.nl>
This commit is contained in:
parent
f7e60b4338
commit
110b8714ab
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,9 @@ export const LocaleSelector = ({
|
|||
key: locale,
|
||||
value: localeToDisplayName(locale) || "",
|
||||
}));
|
||||
|
||||
if (!locales.length) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<FormProvider {...form}>
|
||||
<SelectControl
|
||||
|
|
Loading…
Reference in a new issue