I’ve implemented SEARCH BAR and all is great unless I search and find games that do not have any platform icons. To recreate this, search for HALF. One of the half-life games does not have any platform icons.
The bad game is: Half-Life 2: Downfall
To fix this, we need to check for NULL (truthy) in GameCard.tsx. Here’s the fix:
{game.platforms && (
<PlatformIconList platforms={game.platforms?.map((p) => p.platform)}
/>
Anywhere you might call MAP, you need to confirm your data is there first.
Coding for dollars!
Jerry