Undef check for pokemon#usedTMs

Fixes #4107
This commit is contained in:
ByThePowerOfScience 2024-09-08 10:11:55 -04:00 committed by GitHub
parent 4a98c36427
commit 684c2364b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,6 +44,7 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
if (emptyMoveIndex > -1) {
pokemon.setMove(emptyMoveIndex, this.moveId);
if (this.fromTM) {
pokemon.usedTMs ??= [];
pokemon.usedTMs.push(this.moveId);
}
initMoveAnim(this.scene, this.moveId).then(() => {