fix: 🐛 SOMETHING_HAPPENED_IN_PROMISE when LANGS isn't found

This commit is contained in:
ThatOneCalculator 2023-11-24 18:04:06 -08:00
parent ef71d23d80
commit a8b33b5415
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -25,7 +25,10 @@
//#region Detect language & fetch translations
const v = localStorage.getItem("v") || VERSION;
const supportedLangs = LANGS;
const supportedLangs = []
if (LANGS != null) {
supportedLangs.add(...LANGS)
};
let lang = localStorage.getItem("lang");
if (lang == null || !supportedLangs.includes(lang)) {
if (supportedLangs.includes(navigator.language)) {