From c233bf9b53c0a78078a92aa88e1dd13e63d7e27a Mon Sep 17 00:00:00 2001 From: Egor Matveev Date: Wed, 11 May 2022 15:16:09 +0300 Subject: [PATCH] progress style hotfix --- templates/task.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/task.html b/templates/task.html index ec224c1..076662f 100644 --- a/templates/task.html +++ b/templates/task.html @@ -47,10 +47,16 @@ elem.className = "page-item active"; } if (page === 1) { - document.getElementById("page_prev").style = "display: none;"; + const element = document.getElementById("page_prev"); + if (element) { + element.style = "display: none;"; + } } if (page === pagesCount) { - document.getElementById("page_next").style = "display: none;"; + const element = document.getElementById("page_next"); + if (element) { + element.style = "display: none;"; + } } } jQuery.get('/task_runtime?task_id={{ task.id }}', function(data1) {