mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-25 17:51:50 +01:00
Use populate language code for country code method
This commit is contained in:
parent
d8c96f2b6d
commit
86e81dcd05
@ -126,7 +126,7 @@ export function sortLangCodes(langCodes: string[]) {
|
|||||||
*/
|
*/
|
||||||
export function getCountryCodeForLocale(locale: string): string | null {
|
export function getCountryCodeForLocale(locale: string): string | null {
|
||||||
let output: LanguageObj | null = null as any as LanguageObj;
|
let output: LanguageObj | null = null as any as LanguageObj;
|
||||||
const tag = getTag(locale, true);
|
const tag = getTag(populateLanguageCode(locale), true);
|
||||||
|
|
||||||
if (!tag?.language?.Subtag) return null;
|
if (!tag?.language?.Subtag) return null;
|
||||||
// this function isn't async, so its guaranteed to work like this
|
// this function isn't async, so its guaranteed to work like this
|
||||||
|
Loading…
Reference in New Issue
Block a user