From 38b386d324cb175920aa4b467bc22dc51e5e8740 Mon Sep 17 00:00:00 2001
From: Deepak Khatri <lorforlinux@beagleboard.org>
Date: Sun, 1 Sep 2024 21:47:03 +0530
Subject: [PATCH] Fix todo list issue

---
 _templates/todo.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/_templates/todo.html b/_templates/todo.html
index 7f2609b9..d2f21803 100644
--- a/_templates/todo.html
+++ b/_templates/todo.html
@@ -26,7 +26,7 @@
     var todoItems = document.getElementsByClassName('admonition-todo');
     var todolist = document.getElementById('todolist')
 
-    if(todoItems.length == 0) {
+    if(todoItems.length == 0 || !todoItems[0].hasAttribute('id')) {
         modalfortodoitemsparent.remove();
     } else  {
         for (var i = 0; i < todoItems.length; ++i) {
-- 
GitLab