From df8e3ee8a02402f46d0dd9d341f7cf573c31df6c Mon Sep 17 00:00:00 2001 From: Josue Date: Mon, 29 Mar 2021 18:39:14 -0400 Subject: [PATCH] fix: remove unnecessary check --- striker-ui/components/Anvils.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/striker-ui/components/Anvils.tsx b/striker-ui/components/Anvils.tsx index 60c58f35..509d24af 100644 --- a/striker-ui/components/Anvils.tsx +++ b/striker-ui/components/Anvils.tsx @@ -5,7 +5,6 @@ import PeriodicFetch from '../lib/fetchers/periodicFetch'; const Anvils = ({ list }: { list: AnvilList | undefined }): JSX.Element => { const anvils: AnvilListItem[] = []; - // if (list) anvils = list.anvils; list?.anvils.forEach((anvil: AnvilListItem) => { const { data } = PeriodicFetch( @@ -15,7 +14,7 @@ const Anvils = ({ list }: { list: AnvilList | undefined }): JSX.Element => { /* eslint-disable no-param-reassign */ anvils.push({ ...anvil, - anvil_state: data.anvil_state, + anvil_state: data?.anvil_state, }); });