From 942b534001cecf7dbe1355765547c05f12c2de80 Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Mon, 31 Oct 2022 21:43:58 +0000 Subject: [PATCH] refactor: remove eslint-disable --- 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 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]