PoGoBag icon indicating copy to clipboard operation
PoGoBag copied to clipboard

Ignore gen 2 pokemons to keep the app working

Open jrglee opened this issue 9 years ago • 0 comments

The app started to break as soon as I hatched eggs with gen 2 pokemons. Since I do not know if there is any work in progress regarding the extra pokemons, I did a quick fix just to keep things working as they were.

Here are some tech details

  • The expression i[:pokemon_id].capitalize in the line 75 (line 76 on my PR) returns a Fixnum instead of a string for gen 2 pokemons. This makes the app break on login.
  • A quick fix is to add a to_s and make sure capitalize works but that makes the app load an empty page. It looks like the JSON serialization crashes because there are not base stats for gen 2 pokemons in the pokemon model class.

jrglee avatar Jan 06 '17 07:01 jrglee