core: fix pjax page

This commit is contained in:
undefined committed 2022-11-30 15:36:01 +08:00
1 parent 4cead20f0f
commit a364519a2e
3 files changed
+7 -6

No files matched your search

+1 -1
View File
@@ -133,7 +133,7 @@ class RecordDetailHandler extends ContestDetailBaseHandler {
const lang = langs[this.rdoc.lang]?.pretest || this.rdoc.lang;
this.response.body = this.rdoc.code;
this.response.type = 'text/plain';
this.response.disposition = `attachment; filename="${langs[lang].code_file || `foo.${this.rdoc.lang}`}"`;
this.response.disposition = `attachment; filename="${langs[lang]?.code_file || `foo.${this.rdoc.lang}`}"`;
}
@param('rid', Types.ObjectID)