mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
core: fix homework scoreboard
This commit is contained in:
1 parent
d51c457b7c
commit
ec92d30f01
2 files changed
+2
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.11.14",
|
||||
"version": "3.11.15",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in new issue
Block a user