Add fix for trying to increment solves when solves are hidden

This commit is contained in:
Kevin Chung
2020-09-11 21:12:28 -04:00
parent ba26722407
commit 24dc5cb86c
3 changed files with 18 additions and 11 deletions

View File

@@ -168,15 +168,22 @@ function renderSubmissionResponse(response) {
); );
result_notification.slideDown(); result_notification.slideDown();
$(".challenge-solves").text( if (
parseInt( $(".challenge-solves")
$(".challenge-solves") .text()
.text() .trim()
.split(" ")[0] ) {
) + // Only try to increment solves if the text isn't hidden
1 + $(".challenge-solves").text(
" Solves" parseInt(
); $(".challenge-solves")
.text()
.split(" ")[0]
) +
1 +
" Solves"
);
}
answer_input.val(""); answer_input.val("");
answer_input.removeClass("wrong"); answer_input.removeClass("wrong");

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long