Define getLanguageFromBrowser() for LanguageDropdown

Without it we can't compile, so we should define it. It looks like it's never been defined, and LanguageDropdown seems to use it as a last resort - it should be safe to land.
This commit is contained in:
Travis Ralston 2019-12-19 18:29:22 -07:00
parent 38e75aaae0
commit cfa21cbb8c

View file

@ -336,6 +336,10 @@ export function getLanguagesFromBrowser() {
return [navigator.userLanguage || "en"];
}
export function getLanguageFromBrowser() {
return getLanguagesFromBrowser()[0];
}
/**
* Turns a language string, normalises it,
* (see normalizeLanguageKey) into an array of language strings