mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
bug fix
This commit is contained in:
2 files changed
+4
-2
No files matched your search
@@ -326,7 +326,7 @@ class DomainJoinHandler extends Handler {
|
|||||||
async prepare({ domainId }, target: string = domainId) {
|
async prepare({ domainId }, target: string = domainId) {
|
||||||
const [ddoc, dudoc] = await Promise.all([
|
const [ddoc, dudoc] = await Promise.all([
|
||||||
domain.get(target),
|
domain.get(target),
|
||||||
domain.collUser.findOne({ domainId, uid: this.user._id }),
|
domain.collUser.findOne({ domainId: target, uid: this.user._id }),
|
||||||
]);
|
]);
|
||||||
const assignedRole = this.user.hasPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN)
|
const assignedRole = this.user.hasPriv(PRIV.PRIV_MANAGE_ALL_DOMAIN)
|
||||||
? 'root'
|
? 'root'
|
||||||
|
|||||||
@@ -25,7 +25,9 @@ const page = new NamedPage(['problem_submit', 'contest_detail_problem_submit', '
|
|||||||
}
|
}
|
||||||
for (const key in availableLangs) {
|
for (const key in availableLangs) {
|
||||||
if (config.langs && !config.langs.filter((i) => i === key || i.startsWith(`${key}.`)).length) continue;
|
if (config.langs && !config.langs.filter((i) => i === key || i.startsWith(`${key}.`)).length) continue;
|
||||||
if (window.LANGS[key].pretest?.split('.')[0] === preferences[0].split('.')[0]) preferences.push(key);
|
if (typeof window.LANGS[key]?.pretest === 'string' && window.LANGS[key].pretest.split('.')[0] === preferences[0].split('.')[0]) {
|
||||||
|
preferences.push(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderLanguageSelect(
|
renderLanguageSelect(
|
||||||
|
|||||||
Reference in new issue
Block a user