danielgrijalva / overworld-old

:video_game: Discover, discuss and track your video games.
https://overworld.netlify.com/
120 stars 80 forks source link

Bug when rating a game without backdrop #158

Closed danielgrijalva closed 4 years ago

danielgrijalva commented 5 years ago

Describe the bug When you rate a game (or interact with it in any way) it is saved to the database for caching its data (name, id, cover and backdrop images, etc) and avoid extra calls to IGDB. This particular bug happens when you rate a game that doesn’t have a backdrop image, because the code tries to access an undefined array.

To Reproduce Steps to reproduce the behavior:

  1. Search for a game that doesn’t have a backdrop (background image). Example: Super Mario All-Stars + Super Mario World
  2. Go to the game’s page
  3. Click on the stars to rate it
  4. See error

Screenshots image

pathak-pratik commented 4 years ago

Hi. I have fixed this issue. Please review @danielgrijalva

PathakPratik commented 4 years ago

Please close this issue, since it has been fixed. Thanks.