ui: fix lang select

This commit is contained in:
undefined committed 2022-05-06 10:02:43 +08:00
1 parent e9e2695fdd
commit 2620286aef
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.35.4",
"version": "4.35.5",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
+1 -1
View File
@@ -5,7 +5,7 @@ export default function getAvailableLangs(langsList?: string[]) {
for (const key in LANGS) {
if (prefixes.has(key)) continue;
if (langsList && langsList.length && langsList.join('') && !langsList.includes(key)) continue;
else if (LANGS[key].hidden) continue;
else if (LANGS[key].hidden && !langList?.includes(key)) continue;
Langs[key] = LANGS[key];
}
return Langs;