From 9e35ffaefb9486f90d63665305d3c984ab4d3061 Mon Sep 17 00:00:00 2001 From: ouoertheo Date: Fri, 2 Jun 2023 20:59:21 -0500 Subject: [PATCH] fix auto-check logic bug --- public/scripts/extensions/objective/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/scripts/extensions/objective/index.js b/public/scripts/extensions/objective/index.js index ef17d439a..74ab41719 100644 --- a/public/scripts/extensions/objective/index.js +++ b/public/scripts/extensions/objective/index.js @@ -307,6 +307,8 @@ function onChatDepthInput() { // Update how often we check for task completion function onCheckFrequencyInput() { + checkCounter = $("#objective-check-frequency").val() + $('#objective-counter').text(checkCounter) saveState() } @@ -402,10 +404,9 @@ jQuery(() => { } if ($("#objective-check-frequency").val() > 0) { // Check only at specified interval - if (checkCounter > 0) { - return + if (checkCounter <= 0) { + checkTaskCompleted(); } - checkTaskCompleted(); checkCounter -= 1 } setCurrentTask();