fix: Unrecognized language causes errors
This commit is contained in:
parent
99f30ba01a
commit
41f9a0bda9
1 changed files with 5 additions and 1 deletions
|
@ -801,13 +801,17 @@ function setLanguage() {
|
||||||
actions.push(null);
|
actions.push(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (language.value != null)
|
if (language.value != null && langmap[language.value] != null) {
|
||||||
actions.push({
|
actions.push({
|
||||||
text: langmap[language.value].nativeName,
|
text: langmap[language.value].nativeName,
|
||||||
danger: false,
|
danger: false,
|
||||||
active: true,
|
active: true,
|
||||||
action: () => {},
|
action: () => {},
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
// Unrecognized language, set to null
|
||||||
|
language.value = null;
|
||||||
|
}
|
||||||
|
|
||||||
const langs = Object.keys(langmap);
|
const langs = Object.keys(langmap);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue