mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 13:14:58 +08:00
Fix languageHandler's use of $webapp languages.json for Jest
This commit is contained in:
parent
ffd037dfa8
commit
4dfbce3108
@ -419,9 +419,9 @@ export function pickBestLanguage(langs) {
|
||||
function getLangsJson() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
let url;
|
||||
try {
|
||||
if (typeof(webpackLangJsonUrl) === 'string') { // in Jest this 'url' isn't a URL, so just fall through
|
||||
url = webpackLangJsonUrl;
|
||||
} catch (e) {
|
||||
} else {
|
||||
url = i18nFolder + 'languages.json';
|
||||
}
|
||||
request(
|
||||
|
Loading…
Reference in New Issue
Block a user