fix: 🐛 SOMETHING_HAPPENED_IN_PROMISE when LANGS isn't found
This commit is contained in:
parent
ef71d23d80
commit
a8b33b5415
@ -25,7 +25,10 @@
|
|||||||
//#region Detect language & fetch translations
|
//#region Detect language & fetch translations
|
||||||
const v = localStorage.getItem("v") || VERSION;
|
const v = localStorage.getItem("v") || VERSION;
|
||||||
|
|
||||||
const supportedLangs = LANGS;
|
const supportedLangs = []
|
||||||
|
if (LANGS != null) {
|
||||||
|
supportedLangs.add(...LANGS)
|
||||||
|
};
|
||||||
let lang = localStorage.getItem("lang");
|
let lang = localStorage.getItem("lang");
|
||||||
if (lang == null || !supportedLangs.includes(lang)) {
|
if (lang == null || !supportedLangs.includes(lang)) {
|
||||||
if (supportedLangs.includes(navigator.language)) {
|
if (supportedLangs.includes(navigator.language)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user