forked from pinks/eris
1
0
Fork 0

flags fix

This commit is contained in:
pinks 2023-09-12 03:58:13 +02:00
parent 5b365c9e17
commit 047608e92a
1 changed files with 3 additions and 2 deletions

View File

@ -106,6 +106,7 @@ const languageToFlagMap: Record<string, string> = {
}; };
export function getFlagEmoji(languageCode?: string): string | undefined { export function getFlagEmoji(languageCode?: string): string | undefined {
if (!languageCode) return; const language = languageCode?.split("-").pop()?.toLowerCase();
return languageToFlagMap[languageCode]; if (!language) return;
return languageToFlagMap[language];
} }