mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: also check lang limit of current domain
This commit is contained in:
1 parent
28935b5477
commit
16b9cb461e
2 files changed
+7
-5
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.4.16",
|
"version": "3.4.17",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -310,10 +310,12 @@ export class ProblemDetailHandler extends ProblemHandler {
|
|||||||
this.pdoc.config = pdoc.config;
|
this.pdoc.config = pdoc.config;
|
||||||
}
|
}
|
||||||
if (ddoc.langs && typeof this.pdoc.config !== 'string') {
|
if (ddoc.langs && typeof this.pdoc.config !== 'string') {
|
||||||
this.pdoc.config.langs = intersection(
|
const dl = ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i);
|
||||||
this.pdoc.config.langs || ddoc.langs.split(','),
|
this.pdoc.config.langs = intersection(this.pdoc.config.langs || dl, dl);
|
||||||
ddoc.langs.split(','),
|
}
|
||||||
);
|
if (this.domain.langs && typeof this.pdoc.config !== 'string') {
|
||||||
|
const dl = this.domain.langs.split(',').map((i) => i.trim()).filter((i) => i);
|
||||||
|
this.pdoc.config.langs = intersection(this.pdoc.config.langs || dl, dl);
|
||||||
}
|
}
|
||||||
await bus.serial('problem/get', this.pdoc, this);
|
await bus.serial('problem/get', this.pdoc, this);
|
||||||
[this.psdoc, this.udoc] = await Promise.all([
|
[this.psdoc, this.udoc] = await Promise.all([
|
||||||
|
|||||||
Reference in new issue
Block a user