We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a75d54c commit 526208aCopy full SHA for 526208a
src/main/java/eu/iamgio/pokedex/pokemon/PokemonSpecies.java
@@ -189,7 +189,7 @@ public static PokemonSpecies fromPokemonName(String pokemonName) throws PokedexE
189
pokedexNumbers,
190
Generation.fromJson(json),
191
evolvesFromSpecies.isJsonNull() ? null : new NamedResource(evolvesFromSpecies.getAsJsonObject()).getName(),
192
- PokemonHabitat.valueOf(new NamedResource(json.get("habitat")).toEnumName()),
+ json.get("habitat").isJsonNull() ? null : PokemonHabitat.valueOf(new NamedResource(json.get("habitat")).toEnumName()),
193
NamedResource.getNames(json.getAsJsonArray("egg_groups"))
194
.stream()
195
.map(StringUtil::toEnumName)
0 commit comments