diff --git a/site/src/components/Timeline/Timeline.tsx b/site/src/components/Timeline/Timeline.tsx index 6e4e205d6e85c..02f23697563cd 100644 --- a/site/src/components/Timeline/Timeline.tsx +++ b/site/src/components/Timeline/Timeline.tsx @@ -12,8 +12,7 @@ const groupByDate = ( items.forEach((item) => { const dateKey = getDate(item).toDateString() - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Is not a guarantee a value is defined when access it dynamically - if (itemsByDate[dateKey]) { + if (dateKey in itemsByDate) { itemsByDate[dateKey].push(item) } else { itemsByDate[dateKey] = [item]