mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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
@@ -310,10 +310,12 @@ export class ProblemDetailHandler extends ProblemHandler {
|
||||
this.pdoc.config = pdoc.config;
|
||||
}
|
||||
if (ddoc.langs && typeof this.pdoc.config !== 'string') {
|
||||
this.pdoc.config.langs = intersection(
|
||||
this.pdoc.config.langs || ddoc.langs.split(','),
|
||||
ddoc.langs.split(','),
|
||||
);
|
||||
const dl = ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i);
|
||||
this.pdoc.config.langs = intersection(this.pdoc.config.langs || dl, dl);
|
||||
}
|
||||
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);
|
||||
[this.psdoc, this.udoc] = await Promise.all([
|
||||
|
||||
Reference in new issue
Block a user