From 944197330c6ac14a20c803006cc73555fbd1fbc6 Mon Sep 17 00:00:00 2001 From: Felix Staud Date: Tue, 16 Jul 2024 15:31:42 -0700 Subject: [PATCH] fix can-learn-move-requirement getAllPokemonMoves --- .../requirements/can-learn-move-requirement.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts b/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts index c9d54d54d49..a194933a404 100644 --- a/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts +++ b/src/data/mystery-encounters/requirements/can-learn-move-requirement.ts @@ -77,15 +77,15 @@ export class CanLearnMoveRequirement extends EncounterPokemonRequirement { const allPokemonMoves: Moves[] = []; if (!this.excludeLevelMoves) { - allPokemonMoves.push(...this.getPokemonLevelMoves(pkm)); + allPokemonMoves.push(...(this.getPokemonLevelMoves(pkm) ?? [])); } if (!this.excludeTmMoves) { - allPokemonMoves.push(...pkm.compatibleTms); + allPokemonMoves.push(...(pkm.compatibleTms ?? [])); } if (!this.excludeEggMoves) { - allPokemonMoves.push(...pkm.getEggMoves()); + allPokemonMoves.push(...(pkm.getEggMoves() ?? [])); } return allPokemonMoves;