Fix crash in getPokemon

This commit is contained in:
Guangcong Luo
2020-03-17 20:41:38 -07:00
parent 64e451fa61
commit 25a2d5e2ab

View File

@@ -3017,7 +3017,7 @@ class Battle {
return null;
}
getPokemon(pokemonid: string | undefined) {
if (!pokemonid || pokemonid === '??') return null;
if (!pokemonid || pokemonid === '??' || pokemonid === 'null') return null;
const {siden, slot, pokemonid: parsedPokemonid} = this.parsePokemonId(pokemonid);
pokemonid = parsedPokemonid;