judge: fix warnings

This commit is contained in:
undefined committed 2022-04-03 15:11:43 +08:00
1 parent 0cb5afa169
commit 1adf04ae47
3 files changed
+2 -12

No files matched your search

+1 -1
View File
@@ -143,7 +143,7 @@ class RecordDetailHandler extends Handler {
if (download) {
const lang = langs[rdoc.lang]?.pretest || rdoc.lang;
this.response.body = rdoc.code;
this.response.disposition = `attachment; filename="${langs[lang].code_file}` || `foo.${rdoc.lang}"`;
this.response.disposition = `attachment; filename="${langs[lang].code_file || `foo.${rdoc.lang}`}"`;
return;
}
if (pdoc && !(rdoc.contest && this.user._id === rdoc.uid)) {