core: fix homework scoreboard

This commit is contained in:
undefined committed 2022-04-09 16:20:53 +08:00
1 parent d51c457b7c
commit ec92d30f01
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.11.14",
"version": "3.11.15",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+1 -1
View File
@@ -388,7 +388,7 @@ const homework = buildContestRule({
for (const [rank, tsdoc] of rankedTsdocs) {
const tsddict = {};
for (const item of tsdoc.detail || []) {
if ((tsddict[item.pid].score || 0) <= item.score) tsddict[item.pid] = item;
if ((tsddict[item.pid]?.score || 0) <= item.score) tsddict[item.pid] = item;
}
const row: ScoreboardRow = [
{ type: 'string', value: rank },