ui: fix cond

This commit is contained in:
undefined committed 2021-05-07 22:25:18 +08:00
1 parent 80ac44d98e
commit 0af07a5d16
3 files changed
+3 -4

No files matched your search

@@ -98,7 +98,7 @@ const page = new NamedPage('home_preference', async () => {
$('[name="codeLang"]').val(this.value);
const options = {};
for (const key in window.LANGS) {
if (`${key.startsWith(this.value)}.` && key !== this.value) options[key] = window.LANGS[key].display;
if (key.startsWith(`${this.value}.`) && key !== this.value) options[key] = window.LANGS[key].display;
}
if (Object.keys(options).length > 1) {
setOptions($('#codelang-sub-select'), options);