From 670996070835c5aee9e301d1e485d04c67589744 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 11 Mar 2022 03:07:27 -0800 Subject: [PATCH] Hotfix #3 I'm tired --- components/SearchModal/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/SearchModal/index.tsx b/components/SearchModal/index.tsx index 9aeddb4f..1e8aa954 100644 --- a/components/SearchModal/index.tsx +++ b/components/SearchModal/index.tsx @@ -115,12 +115,12 @@ const SearchModal = (props: Props) => { let recents: Character[] | Weapon[] | Summon[] = [] if (props.object === "weapons") { - recents = cloneDeep(cookies[key] as Weapon[]) + recents = cloneDeep(cookies[key] as Weapon[]) || [] if (!recents.find(item => item.granblue_id === result.granblue_id)) { recents.unshift(result as Weapon) } } else if (props.object === "summons") { - recents = cloneDeep(cookies[key] as Summon[]) + recents = cloneDeep(cookies[key] as Summon[]) || [] if (!recents.find(item => item.granblue_id === result.granblue_id)) { recents.unshift(result as Summon) }