From 34268e6deea723d687cc6a9a7f279c556ca47ec1 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 31 Oct 2022 15:04:51 -0700 Subject: [PATCH] refactor: remove eslint-disable (#4817) --- site/src/components/Timeline/Timeline.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/site/src/components/Timeline/Timeline.tsx b/site/src/components/Timeline/Timeline.tsx index 6e4e205d6e..02f2369756 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]