mirror of
https://github.com/aljazceru/CTFd.git
synced 2025-12-17 14:04:20 +01:00
Add fix for trying to increment solves when solves are hidden
This commit is contained in:
@@ -168,6 +168,12 @@ function renderSubmissionResponse(response) {
|
|||||||
);
|
);
|
||||||
result_notification.slideDown();
|
result_notification.slideDown();
|
||||||
|
|
||||||
|
if (
|
||||||
|
$(".challenge-solves")
|
||||||
|
.text()
|
||||||
|
.trim()
|
||||||
|
) {
|
||||||
|
// Only try to increment solves if the text isn't hidden
|
||||||
$(".challenge-solves").text(
|
$(".challenge-solves").text(
|
||||||
parseInt(
|
parseInt(
|
||||||
$(".challenge-solves")
|
$(".challenge-solves")
|
||||||
@@ -177,6 +183,7 @@ function renderSubmissionResponse(response) {
|
|||||||
1 +
|
1 +
|
||||||
" Solves"
|
" 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
Reference in New Issue
Block a user