mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
38e75aaae0
commit
cfa21cbb8c
|
@ -336,6 +336,10 @@ export function getLanguagesFromBrowser() {
|
||||||
return [navigator.userLanguage || "en"];
|
return [navigator.userLanguage || "en"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getLanguageFromBrowser() {
|
||||||
|
return getLanguagesFromBrowser()[0];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns a language string, normalises it,
|
* Turns a language string, normalises it,
|
||||||
* (see normalizeLanguageKey) into an array of language strings
|
* (see normalizeLanguageKey) into an array of language strings
|
||||||
|
|
Loading…
Reference in New Issue