Skip to content

Commit

Permalink
fix: Error when user clicks several times on continue button.
Browse files Browse the repository at this point in the history
  • Loading branch information
UvgenGen committed Jul 6, 2021
1 parent ca6845b commit 8735523
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/data/thunks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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);
};
}
Expand Down

0 comments on commit 8735523

Please sign in to comment.