core: bug fix

This commit is contained in:
undefined committed 2022-02-02 01:30:06 +08:00
1 parent e67ff511bb
commit 599a45e106
4 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.4.0",
"version": "3.4.1",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+2 -1
View File
@@ -136,7 +136,7 @@ const acm = buildContestRule({
const rows: ScoreboardRow[] = [columns];
for (const [rank, tsdoc] of rankedTsdocs) {
const tsddict: Record<number, AcmDetail> = {};
for (const item of tsdoc.detail) tsddict[item.pid] = item;
for (const item of tsdoc.detail || []) tsddict[item.pid] = item;
const row: ScoreboardRow = [
{ type: 'string', value: rank.toString() },
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
@@ -147,6 +147,7 @@ const acm = buildContestRule({
row.push(
{ type: 'string', value: penalty.toString() },
{ type: 'string', value: tsdoc.time || 0.0 },
{ type: 'string', value: tsdoc.time || 0.0 },
);
}
for (const pid of tdoc.pids) {