From 188c63a7e61e96f807458981e822f646c1c037d8 Mon Sep 17 00:00:00 2001 From: Derick M <58572875+TurtIeSocks@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:39:18 -0500 Subject: [PATCH] fix: rockruff form name issues --- src/components/popups/Gym.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/popups/Gym.jsx b/src/components/popups/Gym.jsx index 2607f216b..264510c20 100644 --- a/src/components/popups/Gym.jsx +++ b/src/components/popups/Gym.jsx @@ -287,7 +287,7 @@ const DropdownOptions = ({ }) } - return options.map((option) => ( + return options.filter(Boolean).map((option) => ( {typeof option.name === 'string' ? t(option.name) : option.name} @@ -508,8 +508,8 @@ const RaidInfo = ({ return t(`costume_${costume}`, 'Unknown Costume') } if (form) { - const raidForm = pokemon[id].forms[form].name - if (raidForm === 'Normal') { + const raidForm = pokemon[id].forms[form]?.name + if (raidForm === 'Normal' || !raidForm) { return '' } return `${raidForm} ${t('form')}`