From 7fc808b2e990345ee4ecefbf29b6e22c50f857dc Mon Sep 17 00:00:00 2001 From: zjz1993 <1429595365@qq.com> Date: Tue, 13 Aug 2019 16:07:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BB=A3=E7=A0=81=E5=81=A5=E5=A3=AE?= =?UTF-8?q?=E6=80=A7=E5=AE=8C=E5=96=84=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- views/submission.ejs | 2 +- views/submission_contest.ejs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views/submission.ejs b/views/submission.ejs index 2715197..bc9e671 100644 --- a/views/submission.ejs +++ b/views/submission.ejs @@ -352,7 +352,7 @@ if (token != null) { socket.emit('join', token, function (data) { console.log("join! ", data); if (data && data.ok) { - if (data.finished && data.result && data.result.judge) { + if (data.finished && data.result && data.result.judge && data.result.judge.subtasks) { let max=0; data.result.judge.subtasks.forEach(function (item) { item.cases.forEach(function (one) { diff --git a/views/submission_contest.ejs b/views/submission_contest.ejs index e4484d9..4bd7ab8 100644 --- a/views/submission_contest.ejs +++ b/views/submission_contest.ejs @@ -337,7 +337,7 @@ if (token != null) { socket.on('finish', function (p) { console.log("Judge finished"); let max=0; - if (p && p.result && p.result.judge) { + if (p && p.result && p.result.judge && p.result.judge.subtasks) { p.result.judge.subtasks.forEach(function (item) { item.cases.forEach(function (one) { max = one.result.time @@ -353,7 +353,7 @@ if (token != null) { socket.emit('join', token, function (data) { console.log("join! ", data); if (data && data.ok) { - if (data.finished && data.result && data.result.judge) { + if (data.finished && data.result && data.result.judge && data.result.judge.subtasks) { let max=0; data.result.judge.subtasks.forEach(function (item) { item.cases.forEach(function (one) {