mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +01:00
[Misc] Update comment in src/utils/pokemon-utils.ts
This commit is contained in:
parent
3d69fc3b30
commit
6c8130db54
@ -18,7 +18,8 @@ export function getPokemonSpecies(species: SpeciesId | SpeciesId[]): PokemonSpec
|
|||||||
species = species[Math.floor(Math.random() * species.length)];
|
species = species[Math.floor(Math.random() * species.length)];
|
||||||
}
|
}
|
||||||
if (species >= 2000) {
|
if (species >= 2000) {
|
||||||
return allSpecies.find(s => s.speciesId === species)!; // TODO: is this bang correct?
|
// the `!` is safe, `allSpecies` is static and contains all `SpeciesId`s
|
||||||
|
return allSpecies.find(s => s.speciesId === species)!;
|
||||||
}
|
}
|
||||||
return allSpecies[species - 1];
|
return allSpecies[species - 1];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user