From 684c2364b7c558b2bf198272cbde62aa05e51aba Mon Sep 17 00:00:00 2001 From: ByThePowerOfScience <16433721+ByThePowerOfScience@users.noreply.github.com> Date: Sun, 8 Sep 2024 10:11:55 -0400 Subject: [PATCH] Undef check for pokemon#usedTMs Fixes #4107 --- src/phases/learn-move-phase.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/phases/learn-move-phase.ts b/src/phases/learn-move-phase.ts index 201019e8860..6f0f63ef106 100644 --- a/src/phases/learn-move-phase.ts +++ b/src/phases/learn-move-phase.ts @@ -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(() => {