diff --git a/packages/vjudge/package.json b/packages/vjudge/package.json index 05393c065..41ba2ab21 100644 --- a/packages/vjudge/package.json +++ b/packages/vjudge/package.json @@ -1,6 +1,6 @@ { "name": "@hydrooj/vjudge", - "version": "1.3.5", + "version": "1.3.6", "description": "Submit problems to remote oj", "main": "package.json", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/vjudge/src/providers/luogu.ts b/packages/vjudge/src/providers/luogu.ts index 3c3fd5dfb..2ebefad89 100644 --- a/packages/vjudge/src/providers/luogu.ts +++ b/packages/vjudge/src/providers/luogu.ts @@ -137,7 +137,9 @@ export default class LuoguProvider implements IBasicProvider { logger.info('Fetched with length', JSON.stringify(body).length); const total = flattenDeep(body.currentData.testCaseGroup).length; // TODO sorted - for (const subtask of data.detail.judgeResult?.subtasks || []) { + if (!data.detail.judgeResult?.subtasks) continue; + for (const key in data.detail.judgeResult.subtasks) { + const subtask = data.detail.judgeResult.subtasks[key]; for (const cid in subtask.testCases || {}) { if (done[`${subtask.id}.${cid}`]) continue; finished++;