mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
set language to english if can't fetch
This commit is contained in:
parent
decba8eaaa
commit
4d1061e486
2 changed files with 3 additions and 2 deletions
|
@ -103,8 +103,6 @@ export async function getLanguage(lang) {
|
|||
} catch (e) {
|
||||
console.error(`error getting language`);
|
||||
console.error(e);
|
||||
//TODO: set config language to english
|
||||
//config.language = "english";
|
||||
showNotification(`Error getting language: ${e.message}`, 4000);
|
||||
await $.getJSON(`languages/english.json`, function (data) {
|
||||
currentLanguage = data;
|
||||
|
|
|
@ -413,6 +413,9 @@ async function initWords() {
|
|||
currentInput = "";
|
||||
|
||||
let language = await Misc.getLanguage(config.language);
|
||||
if (language && language.name !== config.language) {
|
||||
config.language = "english";
|
||||
}
|
||||
|
||||
if (config.mode === "quote" && quotes === null) {
|
||||
showBackgroundLoader();
|
||||
|
|
Loading…
Reference in a new issue