Fix crash in tooltips

This commit is contained in:
Guangcong Luo
2019-07-04 14:12:36 -07:00
parent fa72dd68de
commit 3ad8fb6460

View File

@@ -269,8 +269,9 @@ class BattleTooltips {
case 'zmove': { // move|MOVE|ACTIVEPOKEMON
let move = this.battle.dex.getMove(args[1]);
let index = parseInt(args[2], 10);
let pokemon = this.battle.mySide.active[index]!;
let pokemon = this.battle.mySide.active[index];
let serverPokemon = this.battle.myPokemon![index];
if (!pokemon) return false;
buf = this.showMoveTooltip(move, type === 'zmove', pokemon, serverPokemon);
break;
}