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.
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
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.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.