refactor: add language fallback to make sure its can be display correct

This commit is contained in:
moonrailgun 2024-09-24 00:12:09 +08:00
parent f2ce1fb10c
commit 31e8ce4ab9

View File

@ -172,7 +172,7 @@ export const UserConfig: React.FC<UserConfigProps> = React.memo((props) => {
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuRadioGroup
value={i18n.language}
value={i18n.language ?? 'en'}
onValueChange={setLanguage}
>
{languages.map((language) => (