diff --git a/www/public/resources/js/functions/task.js b/www/public/resources/js/functions/task.js index 640ce63c..58319e90 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); \ + } \ }" ] );