Pokedex Entry treats pokemons_species as NamedApiResource[]
CaNeoN28 opened this issue · 2 comments
What version of pokenode-ts are you using?
1.13.2
What version of Node.js are you using?
16.5.1
What operating system are you using?
Linux(Ubuntu)
Describe the Bug
Pokedex Entry treats pokemon_species as NamedApiResource Array (or NamedApiResource[]). Trying to map the pokemon_species results in "pokemon_species.map() is not a function" in browser console, and trying to get name or url directly from pokemon_species results in a error of typing on Workspace
This is what happens if you ignore the warnings
Expected Behavior
As pokemon_species in Pokemon Entry only have name and url as attributes, it was expected to get an Object instead of an array
To Reproduce
First you get a Pokedex data, then you map or select a position in the pokemon_entries array. Inside of the entry, try to get the name or the url of pokemon_species
Hey @CaNeoN28, thanks for your input!
Will be fixed and released in the next version
Feel free to contribute and open a PR
Fixed in v1.14