Skip to content

Commit

Permalink
Fix: 포켓몬 id에 옵셔널 체이닝
Browse files Browse the repository at this point in the history
  • Loading branch information
cdm1263 committed Jul 26, 2024
1 parent 8446199 commit a80db99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/dex/PokemonDexElementLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const PokemonDexElementLayout = ({
};

const getHighlightClass = () => {
return data.id.toString() === id.pokemonId ? styles.highlighted : '';
return data?.id.toString() === id.pokemonId ? styles.highlighted : '';
};

return (
Expand Down

0 comments on commit a80db99

Please sign in to comment.