From 118078fc75d471f0449c9395478d19878cada158 Mon Sep 17 00:00:00 2001 From: OpenClaw Bot Date: Thu, 19 Feb 2026 20:22:32 -0600 Subject: [PATCH] Fix all optional comments references - add null checks everywhere --- src/app/page.tsx | 6 +++--- src/components/SprintBoard.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 5f30033..37157e4 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -386,7 +386,7 @@ export default function Home() { {task.priority} - {task.comments.length > 0 && ( + {task.comments && task.comments.length > 0 && ( {task.comments.length} @@ -633,12 +633,12 @@ export default function Home() {

- Notes & Comments ({editedTask.comments.length}) + Notes & Comments ({editedTask.comments?.length || 0})

{/* Comment List */}
- {editedTask.comments.length === 0 ? ( + {!editedTask.comments || editedTask.comments.length === 0 ? (

No notes yet. Add the first one!

) : ( editedTask.comments.map((comment) => ( diff --git a/src/components/SprintBoard.tsx b/src/components/SprintBoard.tsx index 2d3569a..4ea9437 100644 --- a/src/components/SprintBoard.tsx +++ b/src/components/SprintBoard.tsx @@ -101,7 +101,7 @@ function SortableTaskCard({ {task.type} - {task.comments.length > 0 && ( + {task.comments && task.comments.length > 0 && ( 💬 {task.comments.length}