mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: objective: validation for empty stdans
This commit is contained in:
1 parent
06e0223793
commit
5ecd9d5952
1 file changed
+1
-1
@@ -30,7 +30,7 @@ export async function judge({
|
|||||||
}
|
}
|
||||||
let totalScore = 0;
|
let totalScore = 0;
|
||||||
let totalStatus = 0;
|
let totalStatus = 0;
|
||||||
if (!Object.keys(answers).length) throw new FormatError('Invalid standard answer.');
|
if (!Object.keys(config.answers).length) throw new FormatError('Invalid standard answer.');
|
||||||
for (const key in config.answers) {
|
for (const key in config.answers) {
|
||||||
const ansInfo = config.answers[key] as [string | string[], number] | Record<string, number>;
|
const ansInfo = config.answers[key] as [string | string[], number] | Record<string, number>;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
// eslint-disable-next-line @typescript-eslint/no-loop-func
|
||||||
|
|||||||
Reference in new issue
Block a user