core: optional files

This commit is contained in:
undefined committed 2021-10-28 00:50:30 +08:00
1 parent 2c1ce1593c
commit 7ca2881787
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.1.12",
"version": "3.1.13",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+3 -3
View File
@@ -480,9 +480,9 @@ export class ProblemFilesHandler extends ProblemDetailHandler {
const links = {};
const size = Math.sum(
this.pdoc[type === 'testdata' ? 'data' : 'additional_file']
.filter((i) => files.has(i.name))
.map((i) => i.size),
);
?.filter((i) => files.has(i.name))
?.map((i) => i.size),
) || 0;
await oplog.add({
type: 'bulkDownload',
time: new Date(),