From 70c7ea9108d9f95f6f31db519fb89938993e0649 Mon Sep 17 00:00:00 2001 From: Sagirov Evgeniy <34642612+UvgenGen@users.noreply.github.com> Date: Tue, 6 Jul 2021 17:11:28 +0300 Subject: [PATCH] fix: Error when user clicks several times on continue button. (#36) --- src/data/thunks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/thunks.js b/src/data/thunks.js index 2c35ccdb..b710648d 100644 --- a/src/data/thunks.js +++ b/src/data/thunks.js @@ -233,7 +233,7 @@ export function stopExam() { const { attempt_id: attemptId, exam_url_path: examUrl } = activeAttempt; await updateAttemptAfter( - exam.course_id, exam.content_id, stopAttempt(attemptId), true, + exam.course_id, exam.content_id, stopAttempt(attemptId), )(dispatch); if (attemptId !== exam.attempt.attempt_id) { @@ -242,7 +242,7 @@ export function stopExam() { }; } -export function continueExam(noLoading = true) { +export function continueExam() { return async (dispatch, getState) => { const { exam } = getState().examState; const attemptId = exam.attempt.attempt_id; @@ -255,7 +255,7 @@ export function continueExam(noLoading = true) { return; } await updateAttemptAfter( - exam.course_id, exam.content_id, continueAttempt(attemptId), noLoading, + exam.course_id, exam.content_id, continueAttempt(attemptId), )(dispatch); }; }