Fix additional cases of missing form data causing crash

This commit is contained in:
Flashfyre committed 2023-11-07 21:05:27 -05:00
1 parent 39a458cb3a
commit 5fa7921e41
2 files changed
+11 -6

No files matched your search

+1 -1
View File
@@ -131,7 +131,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
if (!this.player) {
const speciesOwned = !!pokemon.scene.gameData.getDefaultDexEntry(pokemon.species)?.entry?.caught;
this.ownedIcon.setVisible(speciesOwned);
if (!pokemon.scene.gameData.getPokemonDexEntry(pokemon).caught)
if (!pokemon.scene.gameData.getPokemonDexEntry(pokemon)?.caught)
this.ownedIcon.setTint(0x808080);
}