From 1579e34cb66a6cc60343b02ee16333cdf67e680e Mon Sep 17 00:00:00 2001 From: Ludovic <54670129+lbr38@users.noreply.github.com> Date: Sun, 29 Dec 2024 14:34:17 +0100 Subject: [PATCH] patch --- www/public/resources/js/functions/task.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/public/resources/js/functions/task.js b/www/public/resources/js/functions/task.js index 640ce63c8..58319e901 100644 --- a/www/public/resources/js/functions/task.js +++ b/www/public/resources/js/functions/task.js @@ -111,7 +111,9 @@ function refreshStepsInDOM(steps) if (visibility) { \ $('.task-step-content[task-id=" + taskId + "][step=" + stepIdentifier + "]').css('display', 'grid'); \ } \ - $('.task-step-content[task-id=" + taskId + "][step=" + stepIdentifier + "]').scrollTop($('.task-step-content[task-id=" + taskId + "][step=" + stepIdentifier + "]')[0].scrollHeight); \ + if ($('.task-step-content[task-id=" + taskId + "][step=" + stepIdentifier + "]').length > 0) { \ + $('.task-step-content[task-id=" + taskId + "][step=" + stepIdentifier + "]').scrollTop($('.task-step-content[task-id=" + taskId + "][step=" + stepIdentifier + "]')[0].scrollHeight); \ + } \ }" ] );