Add null check

This commit is contained in:
AJ Fontaine 2025-02-20 19:13:42 -05:00
parent 5a11f57c00
commit 10752415de

View File

@ -833,7 +833,7 @@ export default class PokemonSpecies extends PokemonSpeciesForm implements Locali
if ( // If evolutions shouldn't happen, add more cases here :)
!allowEvolving
|| !pokemonEvolutions.hasOwnProperty(this.speciesId)
|| globalScene.currentBattle.waveIndex === 20 && globalScene.gameMode.isClassic && globalScene.currentBattle.trainer
|| globalScene.currentBattle?.waveIndex === 20 && globalScene.gameMode.isClassic && globalScene.currentBattle.trainer
) {
return this.speciesId;
}